Skip to content

feat: ship a curl installer and the contrib/release driver - #54

Merged
simensen merged 2 commits into
mainfrom
beau/curl-installer
Sep 29, 2026
Merged

simensen merged 2 commits into
mainfrom
beau/curl-installer

Conversation

@simensen

Copy link
Copy Markdown
Member

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 | sh
  • scripts/install.sh: selects clast-linux-amd64 or clast-darwin-arm64 from uname. It downloads the binary and SHA256SUMS from the same release and verifies the binary. Only then does it install to ~/.local/bin. CLAST_VERSION pins a tag, CLAST_BASE_URL selects another repository, and CLAST_INSTALL_DIR changes the destination.
  • release.yml: a new installer step copies the script to dist/clast-install.sh after cross-compile. gh release create names it explicitly, with no glob. SHA256SUMS still covers only the two binaries. This PR does not change the re-gate or the tag trigger.
  • README: the curl install, the Nix install, and the separate clast install [<harness>] projection step.
  • docs/release.md (new): the release flow, the published assets, the environment variables, the trust model of curl | sh and what the checksum covers, and the platform matrix.

Release driver

contrib/release --minor (or --major, --patch, vX.Y.Z) runs make check, writes make release-notes into 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/latest points to v0.0.8, and the curl URL returns 404 until the first release from this history.
  • The first release must be above v0.0.8. Use contrib/release --minor or v0.1.0. --patch computes v0.0.1, which exists, and the driver stops before the gate.

docs/release.md records this.

Testing

  • make check passes. scripts/release_install_test.go checks 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.
  • A disposable fixture (not committed) built the real dist/ with release.yml's own installer and checksums commands. It then piped clast-install.sh into sh with 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 the shasum fallback.
  • A second fixture ran contrib/release in 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.

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.
@simensen
simensen merged commit 1199aa9 into main Sep 29, 2026
5 checks passed
@simensen
simensen deleted the beau/curl-installer branch October 16, 2026 15:10
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