From 279b182dba32f830c7f188771ee2b84a512e5211 Mon Sep 17 00:00:00 2001 From: "Andrew W. Lee" Date: Thu, 28 May 2026 18:08:38 -0700 Subject: [PATCH 1/2] Check in scripts --- scripts/publish.sh | 32 ++++++++++++++++++++++++++++++++ scripts/release.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100755 scripts/publish.sh create mode 100755 scripts/release.sh diff --git a/scripts/publish.sh b/scripts/publish.sh new file mode 100755 index 00000000..111180cd --- /dev/null +++ b/scripts/publish.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +set -euo pipefail + +if [ -z "${1:-}" ]; then + echo "Usage: ./scripts/publish.sh " + echo "Example: ./scripts/publish.sh 4.3.1" + exit 1 +fi + +if [ -z "${GITHUB_TOKEN:-}" ]; then + echo "Error: GITHUB_TOKEN is not set" + exit 1 +fi + +VERSION=$1 +BRANCH="drwl/changelog-$VERSION" + +git checkout main +git pull origin main + +bundle exec rake release + +git checkout -b "$BRANCH" +github_changelog_generator -u drwl -p annotaterb --token "$GITHUB_TOKEN" +git add CHANGELOG.md +git commit -m "Generate changelog for v$VERSION" +git push -u origin HEAD + +gh pr create \ + --title "Generate changelog for v$VERSION" \ + --body "Manually generating changelogs for the time being." \ + --base main diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100755 index 00000000..a457fdf8 --- /dev/null +++ b/scripts/release.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +set -euo pipefail + +if [ -z "${1:-}" ]; then + echo "Usage: ./scripts/release.sh " + echo "Example: ./scripts/release.sh 4.3.1" + exit 1 +fi + +VERSION=$1 +BRANCH="drwl/release-$VERSION" + +git checkout main +git pull origin main +git checkout -b "$BRANCH" + +echo "$VERSION" > VERSION +git add VERSION +git commit -m "Bump version to v$VERSION" +git push -u origin HEAD + +gh pr create \ + --title "Bump version to v$VERSION" \ + --body "Manually doing releases until an automated solution is put in place." \ + --base main + +echo "" +echo "Once the PR is merged, run: ./scripts/publish.sh $VERSION" From c9ae565443b2567285cf4474e45b1e8700014024 Mon Sep 17 00:00:00 2001 From: "Andrew W. Lee" Date: Thu, 28 May 2026 18:24:08 -0700 Subject: [PATCH 2/2] Combine scripts --- scripts/publish.sh | 32 -------------------------------- scripts/release.sh | 15 +++++++++++---- 2 files changed, 11 insertions(+), 36 deletions(-) delete mode 100755 scripts/publish.sh diff --git a/scripts/publish.sh b/scripts/publish.sh deleted file mode 100755 index 111180cd..00000000 --- a/scripts/publish.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -if [ -z "${1:-}" ]; then - echo "Usage: ./scripts/publish.sh " - echo "Example: ./scripts/publish.sh 4.3.1" - exit 1 -fi - -if [ -z "${GITHUB_TOKEN:-}" ]; then - echo "Error: GITHUB_TOKEN is not set" - exit 1 -fi - -VERSION=$1 -BRANCH="drwl/changelog-$VERSION" - -git checkout main -git pull origin main - -bundle exec rake release - -git checkout -b "$BRANCH" -github_changelog_generator -u drwl -p annotaterb --token "$GITHUB_TOKEN" -git add CHANGELOG.md -git commit -m "Generate changelog for v$VERSION" -git push -u origin HEAD - -gh pr create \ - --title "Generate changelog for v$VERSION" \ - --body "Manually generating changelogs for the time being." \ - --base main diff --git a/scripts/release.sh b/scripts/release.sh index a457fdf8..dde477df 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -7,6 +7,11 @@ if [ -z "${1:-}" ]; then exit 1 fi +if [ -z "${GITHUB_TOKEN:-}" ]; then + echo "Error: GITHUB_TOKEN is not set" + exit 1 +fi + VERSION=$1 BRANCH="drwl/release-$VERSION" @@ -15,14 +20,16 @@ git pull origin main git checkout -b "$BRANCH" echo "$VERSION" > VERSION -git add VERSION -git commit -m "Bump version to v$VERSION" +github_changelog_generator -u drwl -p annotaterb --token "$GITHUB_TOKEN" +git add VERSION CHANGELOG.md +git commit -m "Release v$VERSION" git push -u origin HEAD gh pr create \ - --title "Bump version to v$VERSION" \ + --title "Release v$VERSION" \ --body "Manually doing releases until an automated solution is put in place." \ --base main echo "" -echo "Once the PR is merged, run: ./scripts/publish.sh $VERSION" +echo "Once the PR is merged:" +echo " git checkout main && git pull && bundle exec rake release"