Skip to content

Commit

Permalink
fix: update push-tag to check local git is clean, and up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
a-h committed May 20, 2024
1 parent 0c14a89 commit b93d02f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions push-tag.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
#!/bin/sh
if [ `git rev-parse --abbrev-ref HEAD` != "main" ]; then
echo "Error: Not on main branch. Please switch to main branch.";
exit 1;
fi
git pull
if ! git diff --quiet; then
echo "Error: Working directory is not clean. Please commit the changes first.";
exit 1;
fi
export VERSION=`cat .version`
echo Adding git tag with version v${VERSION};
git tag v${VERSION};
Expand Down

0 comments on commit b93d02f

Please sign in to comment.