Skip to content

Commit

Permalink
Refactor release script to prompt for confirmation before pushing gem…
Browse files Browse the repository at this point in the history
… and creating a GitHub release
  • Loading branch information
amkisko committed Dec 8, 2024
1 parent bfd7bd5 commit 59913ab
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion usr/bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ VERSION=$(grep -Eo "VERSION\s*=\s*'.+'" lib/timely-app.rb | grep -Eo "[0-9.]{5,}
GEM_FILE="$GEM_NAME-$VERSION.gem"

e "gem build $GEM_NAME.gemspec"
e "gem push $GEM_FILE"

echo "Ready to release $GEM_FILE $VERSION"
read -p "Continue? [Y/n] " answer
if [[ "$answer" != "Y" ]]; then
echo "Exiting"
exit 1
fi

e "gem push $GEM_FILE"
e "git tag $VERSION && git push --tags"
e "gh release create $VERSION --generate-notes"

0 comments on commit 59913ab

Please sign in to comment.