diff --git a/scripts/pre-push.sh b/scripts/pre-push.sh new file mode 100755 index 0000000..0ad3bbc --- /dev/null +++ b/scripts/pre-push.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +## hook to check version match tag before push +## usage: ln -s ../../scripts/pre-push.sh .git/hooks/pre-push + +VERSIONFILE="gitversion.h" +BRANCH="HEAD" + +tagref=$(grep -Po 'refs/tags/([^ ]*) '