Skip to content

feat!: native installer and rename to selfupdate-go - #11

Merged
bfirestone merged 14 commits into
mainfrom
feat/native-installer
Sep 9, 2026
Merged

bfirestone merged 14 commits into
mainfrom
feat/native-installer

Conversation

@bfirestone

Copy link
Copy Markdown
Contributor

self update used to shell out to curl | bash install.sh. ArchiveInstaller now downloads the goreleaser tarball for the running platform, verifies it against checksums.txt, extracts the binary, and renames it over the running executable. It refuses package-managed paths and unwritable directories before any network call. ScriptInstaller stays for consumers that haven't migrated.

Installer is two-phase. Prepare downloads and verifies, then PreInstall runs, then Commit swaps the binary, then the new PostInstall runs. A CLI that stops a daemon in the hook keeps it up through the download.

The module path is now github.com/sentiolabs/selfupdate-go, matching the Rust port. The two feat!: commits bump release-please to 0.2.0.

Verify with go test -count=1 ./... and golangci-lint run ./.... The README has a migration section for 0.1 callers.

Installer.Prepare downloads and verifies before PreInstall runs, so a consumer that stops a server in the hook keeps it up through the download. Release now carries Assets for the native installer that follows.
Matches the Rust port at SentioLabs/selfupdate-rs. Consumers change their
import path. The GitHub redirect keeps the old clone URL working.
OpenFile honours the process umask, so a user with umask 077 got an
owner-only binary. Chmod after create pins the mode the caller asked for.
macOS puts t.TempDir under /var, a symlink to /private/var, and the
installer prints the resolved path.
@bfirestone

Copy link
Copy Markdown
Contributor Author

This change is part of the following stack:

Change managed by git-spice.

@bfirestone
bfirestone merged commit 781d733 into main Sep 9, 2026
6 checks passed
@bfirestone
bfirestone deleted the feat/native-installer branch September 9, 2026 00:31
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