Install and self-update via GitHub Releases#72
Merged
Conversation
Tag pushes (v*) publish multi-platform archives and checksums; ship --version reports the injected release version. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Existing installs can self-update via resolve → download → checksum verify → atomic replace, with CLI routing that stays off the Ticket Run path. Co-authored-by: Cursor <cursoragent@cursor.com>
Require HTTPS for release assets, surface download rate limits clearly, and move-aside replace on Windows where rename cannot overwrite. Co-authored-by: Cursor <cursoragent@cursor.com>
Gives new users a one-liner that picks linux/darwin amd64/arm64 GoReleaser assets, verifies SHA256, and installs ship to ~/.local/bin (or a writable system bin) with clear PATH and platform errors. Co-authored-by: Cursor <cursoragent@cursor.com>
Leads with the install one-liner and upgrade command so new users do not think they need Go; keep go install/build as secondary and drop the HTML guide. Co-authored-by: Cursor <cursoragent@cursor.com>
Nested uploader objects between name and browser_download_url broke the old sed/brace parsers; parse after the matching name and cover that shape in tests. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
Adds the cross-platform install/update path for Ship: GoReleaser publishes multi-platform archives with embedded version on
v*tags,ship updatedownloads/verifies/replaces the running binary via an Updater port, andinstall.shinstalls checksum-verified release assets into a user PATH bin. README now leads with curl install andship updateso users do not need Go for the primary path.Linked issues
RISK
v*tag is the live integration test. GoReleaser defaults (ship-cli_${version}_${os}_${arch}.tar.gz+ship-cli_${version}_checksums.txt) are hardcoded in bothinstall.shandinternal/update. If archive or checksum naming diverges from those defaults, curl install andship updateboth fail for every user until a follow-up ships. Likelihood: medium on first release if config drifts; low afterward if CIgoreleaser checkstays green.uploaderobject betweennameandbrowser_download_url; tests now mirror that. A future API shape change could make the one-liner fail to resolve assets. Likelihood: low; impact: all curl installs until fixed.update/--version. A regression in that branch would mis-routeship updateinto a Run or break bareship. Likelihood: low (covered by CLI tests).QA — stress-test plan for a human
1. Happy path
curl -fsSL https://raw.githubusercontent.com/maxBRT/ship-cli/feature/installer/install.sh | bash(or the PR branch raw URL / a tagged release once published). Confirm
shiplands in~/.local/bin(or a writable system bin) andship --versionprints a non-devversion after a real release build.go test ./...,staticcheck ./..., andgoreleaser check.ship updateagainst a real or fixture Releases API and confirm it prints old → new and replaces the binary in place.ship --helpand confirm update/version are documented; run bareshipwith Run flags in a normal project checkout and confirm a Ticket Run still starts (no accidental update path).2. Edges / failure cases
SHIP_OS/SHIP_ARCHif using the script’s test hooks, or a fake uname) and confirm a clear unsupported-platform error, not a cryptic download failure.http://example.com/...and confirm HTTPS rejection; confirm checksum mismatch leaves no binary installed.PATHand confirm the script warns clearly.ship update: already-current release → success, no replace; non-writable binary path → permission error, binary unchanged; network / 404 / bad checksum → non-zero exit, existing binary intact..tar.gzassets exist even though the shell installer is Unix-first.3. Out of scope
shipstill starts a Run.”v*tag from this PR review (do that after merge, then re-check install/update against the live Release).Made with Cursor