From: Matthias Maier Date: Sun, 28 May 2017 05:52:36 +0000 (-0500) Subject: CMake: Bugfix: run get_latest_tag only if git is recent enough X-Git-Tag: v9.0.0-rc1~1569^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f7d73f1945e5fb4e1852a2ffc5facddbf9579a3;p=dealii.git CMake: Bugfix: run get_latest_tag only if git is recent enough Fixes #4420 --- diff --git a/cmake/scripts/get_closest_tag.sh b/cmake/scripts/get_closest_tag.sh index 5166c9448c..803880e515 100755 --- a/cmake/scripts/get_closest_tag.sh +++ b/cmake/scripts/get_closest_tag.sh @@ -5,6 +5,11 @@ # - with shortest (positive) distance of the common ancestor to HEAD # +if ! git --version | grep -q "git version 2"; then + # This script requires version 2 or newer + exit 1 +fi + head="$(git rev-parse HEAD)" tags="$(git tag --sort=-creatordate)" diff --git a/cmake/scripts/get_latest_tag.sh b/cmake/scripts/get_latest_tag.sh index c29ace9920..ae880e8b86 100755 --- a/cmake/scripts/get_latest_tag.sh +++ b/cmake/scripts/get_latest_tag.sh @@ -4,6 +4,11 @@ # current HEAD # +if ! git --version | grep -q "git version 2"; then + # This script requires version 2 or newer + exit 1 +fi + head="$(git rev-parse HEAD)" tags="$(git tag --sort=-creatordate)"