Document host-native release launchers

This commit is contained in:
2026-11-04 00:54:44 +00:00
parent bd693ca31b
commit 0269648429
6 changed files with 40 additions and 6 deletions

View File

@@ -154,7 +154,8 @@ uses a persistent native executable when available. Recognized temporary Go-buil
executables provide no native fallback after their driver exits. Command
preparation has its own bounded context after a failed publication, so publication
cancellation permits preparing the later invocation. Each entry point preserves
the recovery exit status.
the recovery exit status. Generated Go-tool handoffs select the host target when
they run, independently of inherited cross-compilation settings.
If the selected entry point becomes unavailable, use another supported ReleaseKit
CLI with the saved record.

View File

@@ -12,7 +12,6 @@ From the consumer module's root, select the ReleaseKit version to adopt:
: "${RELEASEKIT_TOOL_VERSION:?Set the released ReleaseKit version to adopt}"
go get -tool "go.maximumdirect.net/releasekit/cmd/releasekit@${RELEASEKIT_TOOL_VERSION}"
go mod tidy
go tool releasekit version
```
Select a release that implements the API, profile, and workflow you are adopting.
@@ -39,9 +38,15 @@ A launcher invoked from that module can forward commands directly:
```sh
#!/bin/sh
releasekit_host_os=$(go env GOHOSTOS) || exit $?
releasekit_host_arch=$(go env GOHOSTARCH) || exit $?
export GOOS="$releasekit_host_os" GOARCH="$releasekit_host_arch"
exec go tool releasekit "$@"
```
Save this launcher as `releasekit` and run `./releasekit version` from the
selected module to verify registration. It preserves the consumer's workspace
and toolchain settings while selecting the host for the executable.
For a launcher callable from other directories, first change to its consumer
module directory. Follow the [CLI contract](../cli.md) for commands and exit
statuses, and the [configuration reference](../config.md) for the release profile.
@@ -108,6 +113,10 @@ selection, so the committed module files also govern CI delivery and retries.
Registering the CLI as a tool is sufficient for
consumers that use ReleaseKit only for maintainer commands.
Update copied launchers and workflow templates separately when upgrading the
module dependency. ReleaseKit tests the generic bootstrap; consumer wiring tests
can focus on selectors and profile mapping. Profiles continue to select
application build targets.
Upgrade the module-selected tool and workflow together. For a tag created before
that upgrade, retry with the workflow matching the tool recorded at that tag.
Keep its immutable module files and tag intact. See the

View File

@@ -293,7 +293,8 @@ identify an annotated tag object or a commit. The template requires the resolved
commits to match, checks out that commit detached, and confirms the source tree
is clean. It then copies the tagged `go.mod` and any `go.sum` to a temporary
directory outside the checkout. `go list -m` confirms that the module selects
ReleaseKit. The template adds its CLI tool declaration to that temporary copy
ReleaseKit. The template selects the host Go target before preparing and running
the CLI. The template adds its CLI tool declaration to that temporary copy
and prepares tool dependencies with `go list -deps`. It then uses
`go tool -modfile=... releasekit` to build, cache, and run the selected tool with
`CI_WORKSPACE`, the resolved event commit, and `CI_COMMIT_TAG`. The tagged module

View File

@@ -15,6 +15,9 @@ requirements, versioned replacements, and checksums. Local replacements resolve
against their original module directory before relocation. The original main
module remains a local replacement, including when releasing ReleaseKit itself.
The private root provides tool resolution independently of consumer vendoring.
API-only preparation discovers the host target for dependency inspection. The
returned invocation carries its directory and tool arguments; the CLI's later
shell command selects the host again when it runs.
The CLI formats the later invocation using a separate bounded context after
publication failure. It falls back to a persistent native executable when module
selection is unavailable or preparation fails, and excludes recognized temporary

View File

@@ -160,6 +160,8 @@ checks in Stage 6.
## Stage 6: Align consumer guidance and verify the sprint
**Completed.**
1. In the [adoption guide](../consumers/adoption.md), make the minimal
launcher use the Stage 1 recipe followed by `exec go tool releasekit "$@"`.
Run it from the selected module, retaining that consumer's workspace and