Skip to content

Commit

Permalink
Tweak release script
Browse files Browse the repository at this point in the history
  • Loading branch information
rjfarmer committed Nov 10, 2017
1 parent 7b9f397 commit cc87e62
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions new_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ if [[ -z "$1" ]]; then
exit 1
fi

BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ "$BRANCH" != "master" ]]; then
echo 'Not on master branch'
exit 1
fi


VERSION=$1

if [[ $VERSION == v* ]];then
Expand All @@ -16,9 +23,9 @@ sed -i "s/Current\ stable\ version\ is\ .*/Current\ stable\ version\ is\ $VERSIO


git commit setup.py README.md -m "New release"
git tag "v$VERSION"
git tag v$VERSION
git push
git push origin "v$VERSION"
git push origin v$VERSION
python setup.py sdist
twine --upload dist/gfort2py-$VERSION.tar.gz

0 comments on commit cc87e62

Please sign in to comment.