Skip to content

Commit

Permalink
scripts/release.sh: make some tweaks
Browse files Browse the repository at this point in the history
Signed-off-by: Cristian Staretu <[email protected]>
  • Loading branch information
unclejack committed Apr 18, 2017
1 parent ecb8a94 commit ad3273a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@
# BUILD_VERSION - new version being released
# GITHUB_USER - contiv
# GITHUB_TOKEN - your github token
# USE_RELEASE - if 0 or not set, will make a pre-release

cd -P -- "$(dirname -- "$0")"

if [ -z "$(which github-release)" ]; then
echo "Please install github-release before running this script"
echo "You may download a release from https://github.com/aktau/github-release/releases or run 'go get github.com/aktau/github-release' if you have Go installed"
exit 1
fi

if [ -z "$BUILD_VERSION" ]; then
echo "A release requires BUILD_VERSION to be defined"
exit 1
Expand All @@ -19,7 +27,11 @@ fi
if [ "$OLD_VERSION" != "none" ]; then
comparison="$OLD_VERSION..HEAD"
fi
pre_release="-p"

if [ "$USE_RELEASE" != "1" ]; then
echo "Making a pre-release..."
pre_release="-p"
fi

if [ "$OLD_VERSION" != "none" ]; then
changelog=$(git log $comparison --oneline --no-merges --reverse)
Expand Down

0 comments on commit ad3273a

Please sign in to comment.