#!/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/([^ ]*) '