bin/prep-release in codeclimate-0.9.7 vs bin/prep-release in codeclimate-0.10.0
- old
+ new
@@ -12,26 +12,27 @@
exit 64
fi
version=$1
old_version=$(< VERSION)
+branch="release-$version"
if ! bundle exec rake; then
echo "test failure, not releasing" >&2
exit 1
fi
printf "RELEASE %s => %s\n" "$old_version" "$version"
git checkout master
git pull
-git checkout -b "release-$version"
+git checkout -b $branch
printf "%s\n" "$version" > VERSION
bundle
git add VERSION Gemfile.lock
git commit -m "Release v$version"
-git push
+git push origin $branch
if command -v gh > /dev/null 2>&1; then
gh pull-request -m "Release v$version"
else
echo "gh not installed? Please open the PR manually" >&2