From 6633ddde3093d1146a160e48dd40a2fbf7e74bf9 Mon Sep 17 00:00:00 2001 From: Raymond Toy <toy.raymond@gmail.com> Date: Sat, 27 Oct 2012 08:56:52 -0700 Subject: [PATCH] Check the git hash for a release tag too. --- bin/load-world.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/load-world.sh b/bin/load-world.sh index b2fcb2e9d..1ca377957 100755 --- a/bin/load-world.sh +++ b/bin/load-world.sh @@ -14,11 +14,14 @@ NO_PCL_FEATURE= # Default version is the date with the git hash. GIT_HASH="`(cd src; git describe --dirty 2>/dev/null)`" -# If the git hash looks like a snapshot tag, don't add the date. +# If the git hash looks like a snapshot tag or release, don't add the date. +VERSION="`date '+%Y-%m-%d %H:%M:%S'`${GIT_HASH:+ $GIT_HASH}" 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 + +if expr "X${GIT_HASH}" : '^X[0-9][0-9][a-f]' > /dev/null; then + VERSION="${GIT_HASH}" fi echo $VERSION -- GitLab