summaryrefslogtreecommitdiff
path: root/release.sh
diff options
context:
space:
mode:
Diffstat (limited to 'release.sh')
-rwxr-xr-xrelease.sh19
1 files changed, 17 insertions, 2 deletions
diff --git a/release.sh b/release.sh
index ec56862883eb..e16bcbc99b31 100755
--- a/release.sh
+++ b/release.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Guides my forgetful self through the release process.
-# Usage release.sh VERSION
+# Usage: release.sh 0.42.0
set -e
@@ -17,9 +17,16 @@ function prompt() {
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
OUTDIR=$(mktemp -d)
TAG_NAME="v$1"
+BRANCH_NAME="release-$1"
+
+echo ">>>>> Bumping version"
cd $DIR
+git checkout -b "$BRANCH_NAME"
python3 misc/update_version.py "$1"
+git commit -a -m "Bump version to $1"
+git log -2
+prompt "Check the repository state, everything looks good?"
echo ">>>>> Checking changelog"
grep -A 10 -F "$1" CHANGELOG.md || true
@@ -30,7 +37,7 @@ grep PROJECT_NUMBER Doxyfile
prompt "Is the Doxyfile version correct?"
echo ">>>>> Checking CMakeLists"
-grep -A 2 'SET(CBOR_VERSION_MAJOR' CMakeLists.txt
+grep -A 2 'set(CBOR_VERSION_MAJOR' CMakeLists.txt
prompt "Is the CMake version correct?"
echo ">>>>> Checking Bazel build"
@@ -64,6 +71,14 @@ make
ctest
popd
+echo ">>>>> Pushing version bump branch"
+git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)
+echo "Open and merge PR: https://github.com/PJK/libcbor/pull/new/${BRANCH_NAME}"
+prompt "Did you merge the PR?"
+
+git checkout master
+git pull
+
prompt "Will proceed to tag the release with $TAG_NAME."
git commit -a -m "Release $TAG_NAME"
git tag "$TAG_NAME"