Skip to content

feat: re-host static gh (GitHub CLI) in the toolchain#21

Merged
julian-goldstein merged 1 commit into
masterfrom
add-static-gh
Jun 20, 2026
Merged

feat: re-host static gh (GitHub CLI) in the toolchain#21
julian-goldstein merged 1 commit into
masterfrom
add-static-gh

Conversation

@julian-goldstein

@julian-goldstein julian-goldstein commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Adds the GitHub CLI (gh) as a fully-static, version-pinned tool in the toolchain, wired as a full build-path tool (resolved by make, fetched into the per-machine cache) — same class as esbuild.

What changed

  • build/fetch-gh.sh (new) — producer step pulling the official static Go binary from cli/cli (currently v2.95.0), re-host pattern matching fetch-esbuild.sh/fetch-lvh.sh.
  • build/versions.envGH_VERSION=2.95.0 + empty per-arch checksum slots (CI records them on publish).
  • .github/workflows/vendor.ymlgh added to the fetch matrix, the assemble/checksum/publish loops, and the release notes.
  • embed/toolchain.mk$(GH) resolved from the cache on Linux, PATH fallback (gh) elsewhere.
  • embed/fetch-toolchain.shfetch_bin gh so make toolchain pulls it.
  • README.md — tool table + releasing/local-build prose.

Verification

Ran build/fetch-gh.sh amd64 end-to-end: downloads, extracts, and produces a statically linked ELF at x86_64/gh (gitignored). Key names line up across all layers (GH_SHA256_<arch> ↔ the tr a-z A-Z derivation in both fetch-toolchain.sh and vendor.yml); the fetch job's artifact path (x86_64/gh) matches the assemble step.

Notes

  • Checksums are intentionally empty until the first release publishes with gh — same bootstrap state veristat/lvh are in. Until then a consumer hits the existing "no pinned checksum — skipping verify" path.
  • This touches build/, so an unmarked merge on master cuts a minor release (a new tool), which is the intended bump — no [bump:*] marker needed.

🤖 Generated with Claude Code

Wire gh as a full build-path tool alongside esbuild: a fetch-gh.sh
producer pulls the official static Go binary from cli/cli, vendor.yml
re-hosts it per-arch on the release and records checksums, and the embed
glue (toolchain.mk + fetch-toolchain.sh) resolves $(GH) from the cache
with a PATH fallback off-Linux.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@julian-goldstein julian-goldstein merged commit d6f2952 into master Jun 20, 2026
2 checks passed
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