From a839088a4a351224c8809313fe34a5529cd0138c Mon Sep 17 00:00:00 2001 From: Rob Zolkos Date: Fri, 13 Nov 2026 12:58:27 -0500 Subject: [PATCH 1/2] Let the release dry run pass the skills-sync test `make release VERSION=... DRY_RUN=1` passes DRY_RUN=1 down to the preflight, which runs test-sync-skills.sh. sync-skills.sh reads a variable of the same name and accepts only 'local' or 'remote', so every case failed with "DRY_RUN must be unset, 'local' or 'remote', not '1'" and the dry run could not complete. The test now unsets an inherited DRY_RUN, as it does SKILLS_TOKEN. Each case that wants one sets its own. --- scripts/test-sync-skills.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/test-sync-skills.sh b/scripts/test-sync-skills.sh index 5e997b5..66d7e2a 100755 --- a/scripts/test-sync-skills.sh +++ b/scripts/test-sync-skills.sh @@ -37,6 +37,11 @@ printf '[user]\n\tname = test\n\temail = test@example.com\n' > "$GIT_CONFIG_GLOB # fixtures there. unset SKILLS_TOKEN +# Each case names the DRY_RUN it wants. One inherited from the caller is some +# other tool's: `make release DRY_RUN=1` runs this test in its preflight, and +# the script accepts only 'local' or 'remote'. +unset DRY_RUN + # A file:// URL rather than a path: git ignores --depth for a path, and the # script's clone is shallow, so the retry has to fetch as it would from GitHub. origin="${work}/origin.git" From aa384bb0ba9c42663c4c5ec718dada13b578f313 Mon Sep 17 00:00:00 2001 From: Rob Zolkos Date: Fri, 13 Nov 2026 12:59:15 -0500 Subject: [PATCH 2/2] Keep the release switch out of the checks instead Fix the dry run where the sibling CLIs do: release.sh runs release-check without its own DRY_RUN in the environment, and gives the nested make an empty one, since `make release DRY_RUN=1` also carries it through MAKEFLAGS. test-sync-skills.sh goes back to the shared copy unchanged. --- scripts/release.sh | 13 +++++++++++-- scripts/test-sync-skills.sh | 5 ----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index 4dfb925..24914de 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -52,6 +52,15 @@ if grep -q '^replace' go.mod; then exit 1 fi +# DRY_RUN is this script's switch (0 or 1). The skills-sync test reads a DRY_RUN +# of its own, where only 'local' and 'remote' are valid, so keep this one out of +# the checks' environment. `make release DRY_RUN=1` also carries it into the +# nested make through MAKEFLAGS, which unsetting the shell variable does not +# undo, so the nested make is given an empty one. +release_check() { + env -u DRY_RUN make DRY_RUN= release-check +} + echo "Release preflight for $VERSION" echo " Branch: $CURRENT_BRANCH" echo " Commit: $LOCAL" @@ -60,7 +69,7 @@ if [ "$DRY_RUN" = "1" ]; then echo "" echo "DRY RUN: Would run 'make release-check', tag $VERSION, and push" echo "Running release-check..." - make release-check + release_check echo "" echo "DRY RUN complete. No tag created." exit 0 @@ -68,7 +77,7 @@ fi echo "" echo "Running release-check..." -make release-check +release_check echo "" echo "Creating tag $VERSION..." diff --git a/scripts/test-sync-skills.sh b/scripts/test-sync-skills.sh index 66d7e2a..5e997b5 100755 --- a/scripts/test-sync-skills.sh +++ b/scripts/test-sync-skills.sh @@ -37,11 +37,6 @@ printf '[user]\n\tname = test\n\temail = test@example.com\n' > "$GIT_CONFIG_GLOB # fixtures there. unset SKILLS_TOKEN -# Each case names the DRY_RUN it wants. One inherited from the caller is some -# other tool's: `make release DRY_RUN=1` runs this test in its preflight, and -# the script accepts only 'local' or 'remote'. -unset DRY_RUN - # A file:// URL rather than a path: git ignores --depth for a path, and the # script's clone is shallow, so the retry has to fetch as it would from GitHub. origin="${work}/origin.git"