Add the source release launcher
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -31,6 +31,9 @@ go.work.sum
|
||||
# temporary files which can be created if a process still has a handle open of a deleted file
|
||||
.fuse_hidden*
|
||||
|
||||
# Local ReleaseKit bootstrap executable
|
||||
/.releasekit/
|
||||
|
||||
# KDE directory preferences
|
||||
.directory
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ existing library checks pass. Commit the stage before proceeding.
|
||||
|
||||
## Stage 2: implement the source-only publication entry point
|
||||
|
||||
**Status:** pending. **Prerequisite:** Stage 1.
|
||||
**Status:** complete. **Prerequisite:** Stage 1.
|
||||
|
||||
**Files:** root `releasekit.json`, `scripts/release`, `.gitignore`, and stage
|
||||
evidence in this plan.
|
||||
@@ -226,6 +226,15 @@ and verify the executable mode and ignore rule. Exercise zero and multiple
|
||||
arguments without a candidate; both return 2 without tool bootstrap. Do not
|
||||
invoke a valid version against CommandKit's real repository as a smoke check.
|
||||
|
||||
Observed 2026-10-08: reviewed the v0.2.0 profile and CLI references at the
|
||||
selected upstream commit. The profile contains only the product, remote, and
|
||||
effective push URL. `sh -n scripts/release` and `python3 -m json.tool
|
||||
releasekit.json` passed. Git reports the launcher executable, and
|
||||
`git check-ignore -v .releasekit/bin/releasekit` matches the root ignore rule.
|
||||
Zero and two arguments both printed the required usage line and returned status
|
||||
2 with a nonexistent `PATH`, confirming that Go was not invoked; no bootstrap
|
||||
directory was created. No valid version was sent to CommandKit's repository.
|
||||
|
||||
**Completion:** the profile and launcher match the selected target and delegate
|
||||
publication to the module-selected native CLI. Commit the stage.
|
||||
|
||||
|
||||
5
releasekit.json
Normal file
5
releasekit.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"product": "CommandKit",
|
||||
"remote": "origin",
|
||||
"expected_push_url": "https://gitea.maximumdirect.net/eric/CommandKit.git"
|
||||
}
|
||||
29
scripts/release
Executable file
29
scripts/release
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
printf '%s\n' 'usage: ./scripts/release VERSION' >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
release_version=$1
|
||||
commandkit_root=$(CDPATH= cd "$(dirname "$0")/.." && pwd)
|
||||
CDPATH= cd "$commandkit_root"
|
||||
|
||||
mkdir -p .releasekit/bin
|
||||
|
||||
commandkit_host_os=$(GOWORK=off GOTOOLCHAIN=local go env GOHOSTOS)
|
||||
commandkit_host_arch=$(GOWORK=off GOTOOLCHAIN=local go env GOHOSTARCH)
|
||||
GOOS="$commandkit_host_os" \
|
||||
GOARCH="$commandkit_host_arch" \
|
||||
GOWORK=off \
|
||||
GOTOOLCHAIN=local \
|
||||
go build \
|
||||
-mod=readonly \
|
||||
-o "$commandkit_root/.releasekit/bin/releasekit" \
|
||||
gitea.maximumdirect.net/eric/ReleaseKit/cmd/releasekit
|
||||
|
||||
exec "$commandkit_root/.releasekit/bin/releasekit" publish \
|
||||
--repo "$commandkit_root" \
|
||||
--config "$commandkit_root/releasekit.json" \
|
||||
"$release_version"
|
||||
Reference in New Issue
Block a user