Skip to content

feat(self): adopt go-selfupdate and fix nightly builds - #80

Merged
bfirestone merged 6 commits into
mainfrom
feat/go-selfupdate
Sep 4, 2026
Merged

bfirestone merged 6 commits into
mainfrom
feat/go-selfupdate

Conversation

@bfirestone

Copy link
Copy Markdown
Contributor

cmd/arc/self.go now 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 -c for --check, its channel in cfg.Updates.Channel, and the SQLite backup before a major or minor bump. Message wording now matches the library. arc self update asks for confirmation before installing, and -y skips 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 wait and server logs --follow honor cancellation.

Verify: mise exec -- go test -count=1 ./... and golangci-lint run ./... are clean. arc issues envctl-04qa.00bow5.3.1.x and envctl-04qa.05sb33.

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.
@bfirestone
bfirestone merged commit 5bd33b8 into main Sep 4, 2026
4 checks passed
@bfirestone
bfirestone deleted the feat/go-selfupdate branch September 4, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant