From 8e025dcdc1d258fa9e2c08edb7f30a25a8de7081 Mon Sep 17 00:00:00 2001
From: Raymond Toy <toy.raymond@gmail.com>
Date: Mon, 6 Feb 2012 22:47:49 -0800
Subject: [PATCH] If git describe looks like a snapshot tag, just use that as
 the default version instead of adding the date to it. The tag has most of the
 desired information already, and this helps to keep
 lisp-implementation-version from having duplicate information.

---
 bin/load-world.sh | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/bin/load-world.sh b/bin/load-world.sh
index 288e40c04..b2fcb2e9d 100755
--- a/bin/load-world.sh
+++ b/bin/load-world.sh
@@ -13,7 +13,13 @@ SKIP_PCL=
 NO_PCL_FEATURE=
 # Default version is the date with the git hash.
 GIT_HASH="`(cd src; git describe --dirty 2>/dev/null)`"
-VERSION="`date '+%Y-%m-%d %H:%M:%S'`${GIT_HASH:+ $GIT_HASH}"
+
+# If the git hash looks like a snapshot tag, don't add the date.
+if expr "X${GIT_HASH}" : '^Xsnapshot-[0-9][0-9][0-9][0-9]-[01][0-9]' > /dev/null; then
+    VERSION="${GIT_HASH}"
+else
+    VERSION="`date '+%Y-%m-%d %H:%M:%S'`${GIT_HASH:+ $GIT_HASH}"
+fi
 echo $VERSION
 
 while getopts "p" arg
@@ -40,7 +46,7 @@ if [ -n "$SKIP_PCL" ]; then
     NO_PCL_FEATURE="(pushnew :no-pcl *features*)"
 fi
 
-# If version string give, use it, otherwise use the default.
+# If version string given, use it, otherwise use the default.
 if [ -n "$2" ]; then
     VERSION="$2"
 fi
-- 
GitLab