From a19267b11311d21931d45d0d4bc20dacca71d272 Mon Sep 17 00:00:00 2001 From: Daniel Lindsley Date: Sat, 16 May 2026 19:16:33 -0500 Subject: [PATCH 1/2] chore: Added a `publish-release` just task. --- justfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/justfile b/justfile index 5c2b722..2aab030 100644 --- a/justfile +++ b/justfile @@ -34,3 +34,13 @@ compile-all: publish-docs branch="gh-pages": ./scripts/publish-docs.sh "{{branch}}" + +publish-release version: + echo "Did you bump `VERSION`?" + echo "Did you bump `package.json`'s `version`?" + exit 1 + git tag v{{version}} + git push origin --tags + bun publish --dry-run + bun publish --access public + echo "Go test the binary install, dummy." From 0dbedfe6784163d034c1c19a02eb438c841b97ff Mon Sep 17 00:00:00 2001 From: Daniel Lindsley Date: Sat, 23 May 2026 03:06:23 -0500 Subject: [PATCH 2/2] More work on the publish-release task. --- justfile | 9 +------- scripts/publish-release.sh | 42 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 8 deletions(-) create mode 100755 scripts/publish-release.sh diff --git a/justfile b/justfile index 2aab030..0147c3e 100644 --- a/justfile +++ b/justfile @@ -36,11 +36,4 @@ publish-docs branch="gh-pages": ./scripts/publish-docs.sh "{{branch}}" publish-release version: - echo "Did you bump `VERSION`?" - echo "Did you bump `package.json`'s `version`?" - exit 1 - git tag v{{version}} - git push origin --tags - bun publish --dry-run - bun publish --access public - echo "Go test the binary install, dummy." + ./scripts/publish-release.sh "{{version}}" diff --git a/scripts/publish-release.sh b/scripts/publish-release.sh new file mode 100755 index 0000000..ca599ab --- /dev/null +++ b/scripts/publish-release.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +set -euo pipefail + +version="${1:?Usage: ./scripts/publish-release.sh }" +repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" + +cd "$repo_root" + +confirm() { + local prompt="$1" + local response + read -r -p "$prompt [y/N] " response + case "$response" in + y|Y|yes|YES) + return 0 + ;; + *) + return 1 + ;; + esac +} + +confirm "Did you bump src/constants.ts VERSION?" || { + echo "Aborting publish-release." + exit 1 +} + +confirm "Did you bump package.json version?" || { + echo "Aborting publish-release." + exit 1 +} + +confirm "Did you update CHANGELOG.md?" || { + echo "Aborting publish-release." + exit 1 +} + +git tag "v${version}" +git push origin --tags +bun publish --dry-run +bun publish --access public +echo "Go test the binary install, dummy."