From 012af5e80a027cbf255bfd510c5de7c701c38ad9 Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Thu, 8 Oct 2026 16:39:14 +0000 Subject: [PATCH] Add the source release launcher --- .gitignore | 3 +++ docs/roadmap/implementation.md | 11 ++++++++++- releasekit.json | 5 +++++ scripts/release | 29 +++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 releasekit.json create mode 100755 scripts/release diff --git a/.gitignore b/.gitignore index 6d14d34..d3fd629 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/docs/roadmap/implementation.md b/docs/roadmap/implementation.md index 68d7bce..c54a7db 100644 --- a/docs/roadmap/implementation.md +++ b/docs/roadmap/implementation.md @@ -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. diff --git a/releasekit.json b/releasekit.json new file mode 100644 index 0000000..c4852b9 --- /dev/null +++ b/releasekit.json @@ -0,0 +1,5 @@ +{ + "product": "CommandKit", + "remote": "origin", + "expected_push_url": "https://gitea.maximumdirect.net/eric/CommandKit.git" +} diff --git a/scripts/release b/scripts/release new file mode 100755 index 0000000..b3ae9e6 --- /dev/null +++ b/scripts/release @@ -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"