1
0
mirror of https://github.com/a-h/templ.git synced 2025-02-06 09:45:21 +00:00

fix: update push-tag to check local git is clean, and up to date

This commit is contained in:
Adrian Hesketh 2024-05-20 09:51:35 +01:00
parent 0c14a89923
commit b93d02f6be
No known key found for this signature in database
GPG Key ID: 9E01387222323123

View File

@ -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};