Skip to content

Commit

Permalink
Adjust release to commit if there are changes
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwald committed Mar 13, 2015
1 parent af7f371 commit 07f211a
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions dev-bin/make-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

set -e

if [ -n "$(git status --porcelain)" ]; then
echo ". is not clean." >&2
exit 1
fi

VERSION=$(perl -MFile::Slurp::Tiny=read_file -MDateTime <<EOF
use v5.16;
my \$log = read_file(q{CHANGELOG.md});
Expand All @@ -20,9 +15,13 @@ perl -pi -e "s/(?<=#define PHP_MAXMINDDB_VERSION \")\d+\.\d+\.\d+(?=\")/$VERSION

git diff

git commit -m "Bumped version to $VERSION" -a
if [ -n "$(git status --porcelain)" ]; then
git commit -m "Bumped version to $VERSION" -a
fi

git tag -a -m "Release for $VERSION" "v$VERSION"
TAG="v$VERSION"
echo "Creating tag $TAG"
git tag -a -m "Release for $VERSION" "$TAG"


read -p "Push to origin? (y/n) " SHOULD_PUSH
Expand Down

0 comments on commit 07f211a

Please sign in to comment.