Align source and standalone tool instructions

This commit is contained in:
2026-11-04 01:24:16 +00:00
parent d99fac23e9
commit ec67496569
5 changed files with 24 additions and 5 deletions

View File

@@ -32,6 +32,8 @@ participate in dependency version selection and can raise the consumer module's
Go minimum. See the
[Go tool dependency reference](https://go.dev/ref/mod#go-mod-file-tool).
### Select the Go host target
Run `go tool releasekit` from within the consumer module to use its selected
version. Go builds and caches the executable and preserves its exit status.
A launcher invoked from that module can forward commands directly:

View File

@@ -337,10 +337,21 @@ and application artifact compilation retain their separate environments.
The normal Go module and build caches are sufficient. Cache mounts may be added
as deployment configuration when they help the runner; they are not needed by
the template. A separately installed executable can be installed with
`go install go.maximumdirect.net/releasekit/cmd/releasekit@PIN`, then run
with the same arguments. With the event object available in the CI checkout,
resolve it to its source commit before invocation:
the template. For a standalone installation, replace `PIN` with the desired
version and [select the Go host target](adoption.md#select-the-go-host-target)
for `go install`:
```sh
(
releasekit_host_os=$(go env GOHOSTOS) || exit $?
releasekit_host_arch=$(go env GOHOSTARCH) || exit $?
export GOOS="$releasekit_host_os" GOARCH="$releasekit_host_arch"
go install go.maximumdirect.net/releasekit/cmd/releasekit@PIN
)
```
With the event object available in the CI checkout, resolve it to its source
commit before invoking the installed executable:
```sh
expected_commit=$(git -C "$CI_WORKSPACE" rev-parse --verify "${CI_COMMIT_SHA}^{commit}")