]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Bugfix: run get_latest_tag only if git is recent enough 4424/head
authorMatthias Maier <tamiko@43-1.org>
Sun, 28 May 2017 05:52:36 +0000 (00:52 -0500)
committerMatthias Maier <tamiko@43-1.org>
Sun, 28 May 2017 05:52:36 +0000 (00:52 -0500)
Fixes #4420

cmake/scripts/get_closest_tag.sh
cmake/scripts/get_latest_tag.sh

index 5166c9448c741589700c26ffcb56498dcd52870b..803880e5159341f2674012d0892056c9e17674bc 100755 (executable)
@@ -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)"
index c29ace9920f937f2f27833deab053ba48653f927..ae880e8b860cf8ca7a6f898bbeec5f6891f0e7a2 100755 (executable)
@@ -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)"

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.