Skip to content

Commit 07f211a

Browse files
committed
Adjust release to commit if there are changes
1 parent af7f371 commit 07f211a

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

dev-bin/make-release.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
set -e
44

5-
if [ -n "$(git status --porcelain)" ]; then
6-
echo ". is not clean." >&2
7-
exit 1
8-
fi
9-
105
VERSION=$(perl -MFile::Slurp::Tiny=read_file -MDateTime <<EOF
116
use v5.16;
127
my \$log = read_file(q{CHANGELOG.md});
@@ -20,9 +15,13 @@ perl -pi -e "s/(?<=#define PHP_MAXMINDDB_VERSION \")\d+\.\d+\.\d+(?=\")/$VERSION
2015

2116
git diff
2217

23-
git commit -m "Bumped version to $VERSION" -a
18+
if [ -n "$(git status --porcelain)" ]; then
19+
git commit -m "Bumped version to $VERSION" -a
20+
fi
2421

25-
git tag -a -m "Release for $VERSION" "v$VERSION"
22+
TAG="v$VERSION"
23+
echo "Creating tag $TAG"
24+
git tag -a -m "Release for $VERSION" "$TAG"
2625

2726

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

0 commit comments

Comments
 (0)