Repository navigation
feat(self): adopt go-selfupdate and fix nightly builds - #80
Merged
Merged
Conversation
The GitHub lookup, channel regexes and semver comparison now live in github.com/sentiolabs/go-selfupdate. Messages follow the library's wording. The update command now asks for confirmation before installing, and the new -y flag skips the prompt for scripts.
A nightly tagged with the released version sorts below it under semver, so the nightly channel resolved to stable after every release.
GITHUB_TOKEN pushes do not start workflow runs, so prerelease.yml never ran for nightly tags. workflow_dispatch is exempt from that rule.
A signal handler stops SIGINT from killing arc outright, and signal.Stop won't put the default back. So server logs --follow and plan wait now watch the context instead of sleeping.
signal.Stop does not restore the fatal default, so a handler alone would leave arc unkillable in any command that ignores its context. A second SIGINT or SIGTERM now exits with 128 plus the signal number.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cmd/arc/self.gonow delegates to github.com/sentiolabs/go-selfupdate v0.1.1. The GitHub lookup, channel regexes, stable-wins rule and install-script runner moved to the shared library, and the file dropped from 375 to 92 lines. arc keeps-cfor--check, its channel incfg.Updates.Channel, and the SQLite backup before a major or minor bump. Message wording now matches the library.arc self updateasks for confirmation before installing, and-yskips the prompt.Two workflow fixes. nightly.yml tags the next patch version so nightlies sort above the current release, and it dispatches prerelease.yml because a tag pushed with GITHUB_TOKEN never triggers a workflow. arc has had nightly tags with no binaries since June for that reason.
The root command runs with a signal-aware context. The first Ctrl-C cancels, a second exits 130.
plan waitandserver logs --followhonor cancellation.Verify:
mise exec -- go test -count=1 ./...andgolangci-lint run ./...are clean. arc issues envctl-04qa.00bow5.3.1.x and envctl-04qa.05sb33.