Repository navigation
feat: ship a curl installer and the contrib/release driver - #54
Merged
Merged
Conversation
Adopt the toolsmith skeleton's curl installer (T37) as scripts/install.sh, adapted to clast's audited release matrix: clast-linux-amd64 and clast-darwin-arm64, CLAST_VERSION / CLAST_BASE_URL / CLAST_INSTALL_DIR, and a closing hint that names clast's real projection verb, `clast install [<harness>]`. release.yml copies the script to dist/clast-install.sh after cross-compile has created dist/ and names it explicitly in `gh release create`. SHA256SUMS still covers only the two binaries: the installer is what verifies them, and `curl | sh` has already run it before any check could. scripts/release_install_test.go is the skeleton's fake-curl/fake-uname test, ported: latest and pinned URLs in order, both asset names, installed bytes and mode, checksum refusal with the destination absent and preserved, and temp cleanup. shellcheck covers the script. docs/release.md records the release flow, the published assets, the installer's knobs and trust model, and that the legacy v0.0.x tags are not on this history, so the first release here must be above v0.0.8 before the latest-download URL resolves.
Port toolsmith's contrib/release (T33, from ste9 19720b5) verbatim. It makes C6.1's one human action repeatable: compute the next tag from `git describe --match 'v[0-9]*' --abbrev=0` (or take an explicit vX.Y.Z), preflight tools, a clean tree, an untaken tag, and commits since the last tag, run `make check`, write `make release-notes` into the annotated tag message, then push the branch and then only that tag. The load-bearing details come across unchanged: --cleanup=whitespace so the `## [x.y.z]` lines survive, the empty no-tags sentinel instead of v0.0.0, branch before tag, the non-empty RELEASE_NOTES.md guard, and --no-follow-tags with no force-push. release.yml still builds its body with --notes-file from the same make target, so a tag pushed by hand releases the same way. docs/release.md adds the driver and the clast-specific catch: the legacy v0.0.x tags are not on main, so the first release here needs --minor or an explicit v0.1.0; --patch computes v0.0.1, which exists, and the driver refuses before the gate.
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.
Adds a curl installer for the release binaries and a local release driver. Both come from the toolsmith skeleton: the installer is T37 and the driver is T33.
Installer
curl -fsSL https://github.com/procrastivity/clast/releases/latest/download/clast-install.sh | shscripts/install.sh: selectsclast-linux-amd64orclast-darwin-arm64fromuname. It downloads the binary andSHA256SUMSfrom the same release and verifies the binary. Only then does it install to~/.local/bin.CLAST_VERSIONpins a tag,CLAST_BASE_URLselects another repository, andCLAST_INSTALL_DIRchanges the destination.installerstep copies the script todist/clast-install.shafter cross-compile.gh release createnames it explicitly, with no glob.SHA256SUMSstill covers only the two binaries. This PR does not change the re-gate or the tag trigger.clast install [<harness>]projection step.docs/release.md(new): the release flow, the published assets, the environment variables, the trust model ofcurl | shand what the checksum covers, and the platform matrix.Release driver
contrib/release --minor(or--major,--patch,vX.Y.Z) runsmake check, writesmake release-notesinto an annotated tag, and pushes the branch and then only that tag. It is toolsmith's copy, byte for byte.Old tags
Tags v0.0.1–v0.0.8 come from the old clast history, which is not an ancestor of
main. Their releases publish only a.tgz. So:releases/latestpoints to v0.0.8, and the curl URL returns 404 until the first release from this history.contrib/release --minororv0.1.0.--patchcomputes v0.0.1, which exists, and the driver stops before the gate.docs/release.mdrecords this.Testing
make checkpasses.scripts/release_install_test.gochecks the installer with a fake curl and a fake uname: latest and pinned URLs in order, both asset names, installed bytes and mode, checksum refusal with and without an existing binary, and temp cleanup.dist/with release.yml's owninstallerandchecksumscommands. It then pipedclast-install.shintoshwith a fake curl. The installed Linux binary ran, and the macOS binary was real Mach-O arm64. The installer refused tampered binaries, stopped before any download on unsupported platforms, and worked with theshasumfallback.contrib/releasein a clone whose origin was a local bare repo. It cut v0.1.0 and then v0.1.1. The tag message kept its##lines, the driver pushed only the new tag, and the refusal cases held.This PR pushes no tag.