Commit 1d7be0b8 authored by Jens Kroeger's avatar Jens Kroeger
Browse files

Merge branch 'fix_tag_check' into 'master'

Git hook: take reference CMake file not from master but from the tagged version

See merge request !396
parents abe2cf23 a3c39918
Pipeline #2303511 passed with stages
in 46 minutes and 49 seconds
......@@ -24,7 +24,10 @@ if [ -z "$TAGREF" ]; then
# retrieve the version number from the VERSIONFILE
VERSION=$(git cat-file blob master:"$VERSIONFILE" | grep -m 1 'CORRYVRECKAN_VERSION' | sed 's/^[^"]*"//;s/"[^"]*$//')
VERSION=$(git cat-file blob "$TAGREF":"$VERSIONFILE" | grep -m 1 'CORRYVRECKAN_VERSION' | sed 's/^[^"]*"//;s/"[^"]*$//')
echo "Tag name: $TAGREF"
echo "Version: $VERSION (from file $VERSIONFILE)"
# The tag name matches the version number -- exit normally
if [ "$TAGREF" = "$VERSION" ]; then
......@@ -33,6 +36,4 @@ if [ "$TAGREF" = "$VERSION" ]; then
echo "Tag name doesn't match version file. Preventing push."
echo "Tag name: $TAGREF"
echo "Version: $VERSION (from file $VERSIONFILE)"
exit 1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment