Documentation
¶
Overview ¶
Command release builds the prebuilt nsgo binaries a release attaches: an archive per platform and checksums.txt over them, from the checked-out commit, which must carry the tag vX.Y.Z so that Go stamps that version into each binary.
go run ./tools/release -out DIR X.Y.Z
It cross-compiles ./cmd/nsgo with CGO_ENABLED=0 and -trimpath for every platform in targets, packs each binary with LICENSE and README.md into nsgo_<version>_<os>_<arch>.tar.gz (.zip for Windows), writes checksums.txt in sha256sum's format, then reads everything back: the checksums, each archive's entries, and each binary's build information, which must name the release's version, its platform, CGO_ENABLED=0 and -trimpath. The binary for the running platform also runs nsgo version. release.yml runs it before it tags anything, and release-assets.yml runs it on pull requests that change it, so a broken build fails there rather than in a release. The asset names and layout are a contract the install script and the Homebrew tap read.