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

@@ -31,7 +31,9 @@ Run the offline Go test suite from the repository root with:
go test ./... go test ./...
``` ```
The version command prints ReleaseKit's version: The version command prints ReleaseKit's version. For the `go run` examples
below, [select the Go host target](docs/consumers/adoption.md#select-the-go-host-target)
if your shell is set to cross-compile.
```sh ```sh
go run ./cmd/releasekit version go run ./cmd/releasekit version

View File

@@ -4,6 +4,8 @@ ReleaseKit currently provides eight commands. The exit statuses below belong
to the native executable. `go run` examples are convenient for source execution, to the native executable. `go run` examples are convenient for source execution,
but the Go driver maps a nonzero child exit status to 1. Use the built executable but the Go driver maps a nonzero child exit status to 1. Use the built executable
or `./scripts/release` for publication when distinct statuses are needed. or `./scripts/release` for publication when distinct statuses are needed.
For the `go run` examples, [select the Go host target](consumers/adoption.md#select-the-go-host-target)
before running from a shell set to cross-compile.
Print the executable version: Print the executable version:

View File

@@ -32,6 +32,8 @@ participate in dependency version selection and can raise the consumer module's
Go minimum. See the Go minimum. See the
[Go tool dependency reference](https://go.dev/ref/mod#go-mod-file-tool). [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 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. version. Go builds and caches the executable and preserves its exit status.
A launcher invoked from that module can forward commands directly: 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 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 as deployment configuration when they help the runner; they are not needed by
the template. A separately installed executable can be installed with the template. For a standalone installation, replace `PIN` with the desired
`go install go.maximumdirect.net/releasekit/cmd/releasekit@PIN`, then run version and [select the Go host target](adoption.md#select-the-go-host-target)
with the same arguments. With the event object available in the CI checkout, for `go install`:
resolve it to its source commit before invocation:
```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 ```sh
expected_commit=$(git -C "$CI_WORKSPACE" rev-parse --verify "${CI_COMMIT_SHA}^{commit}") expected_commit=$(git -C "$CI_WORKSPACE" rev-parse --verify "${CI_COMMIT_SHA}^{commit}")

View File

@@ -141,6 +141,8 @@ semantics and the separate profile selection for built-in builds.
### Align direct source and standalone CI recipes with the launcher guidance ### Align direct source and standalone CI recipes with the launcher guidance
**Completed.** The source examples link to host selection, and the standalone install recipe scopes the same settings to `go install`. Both paths were verified under a foreign target.
**Evidence:** The [README quick start](../../README.md) and **Evidence:** The [README quick start](../../README.md) and
[CLI reference](../cli.md) still recommend bare `go run ./cmd/releasekit` [CLI reference](../cli.md) still recommend bare `go run ./cmd/releasekit`
for source invocation. The [consumer delivery guide](../consumers/delivery.md#woodpecker-tag-workflows) for source invocation. The [consumer delivery guide](../consumers/delivery.md#woodpecker-tag-workflows)