From e3f823045c725642cccd07cd03950c3595c3a094 Mon Sep 17 00:00:00 2001 From: Steve Cliff Date: Mon, 13 Apr 2026 09:23:28 +0100 Subject: [PATCH] Auto-publish in non-interactive mode in release script When stdin is not a terminal (e.g. run from a tool or CI), skip the confirmation prompt and proceed with publishing. Co-Authored-By: Claude Opus 4.6 (1M context) --- release.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/release.sh b/release.sh index a9c6266..e020c98 100755 --- a/release.sh +++ b/release.sh @@ -170,7 +170,13 @@ if [ ${#BUILT[@]} -eq 0 ]; then fi echo "" -read -rp "Publish release ${TAG} to ${FORGE}? [y/N] " confirm +if [ -t 0 ]; then + read -rp "Publish release ${TAG} to ${FORGE}? [y/N] " confirm +else + # Non-interactive (piped/scripted) — default to yes + confirm="y" + echo "Non-interactive mode: auto-publishing release ${TAG} to ${FORGE}" +fi if [[ ! "${confirm}" =~ ^[Yy]$ ]]; then echo "Skipped. Artifacts are in ${RELEASE_DIR}/" exit 0