diff --git a/script/bump b/script/bump new file mode 100755 index 00000000..faf05dde --- /dev/null +++ b/script/bump @@ -0,0 +1,21 @@ +#!/bin/bash -ex + +(git branch | grep -q '* master') || { + echo "Only release from the master branch." + exit 1 +} + +VERSION_FILE="./lib/github-pages/version.rb" +OLD_VERSION=$(curl "https://rubygems.org/api/v1/versions/github-pages/latest.json" | jq -r .version) +NEW_VERSION=$(expr $OLD_VERSION + 1) +echo -e "module GitHubPages\n VERSION = $NEW_VERSION\nend" > $VERSION_FILE +git add $VERSION_FILE +git commit -m "Bump :gem: to v$NEW_VERSION" +git push origin master + +script/release + +echo "Ok! v$NEW_VERSION is released." +echo "Please fill out the release: https://github.com/github/pages-gem/releases/tag/v$NEW_VERSION" +echo "Here's the git history since the last release:" +git log --one-line v$OLD_VERSION...v$NEW_VERSION