Skip to content
Snippets Groups Projects
Commit 8e025dcd authored by Raymond Toy's avatar Raymond Toy
Browse files

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.
parent 701bc7eb
Branches
Tags
No related merge requests found
...@@ -13,7 +13,13 @@ SKIP_PCL= ...@@ -13,7 +13,13 @@ SKIP_PCL=
NO_PCL_FEATURE= NO_PCL_FEATURE=
# Default version is the date with the git hash. # Default version is the date with the git hash.
GIT_HASH="`(cd src; git describe --dirty 2>/dev/null)`" 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 echo $VERSION
while getopts "p" arg while getopts "p" arg
...@@ -40,7 +46,7 @@ if [ -n "$SKIP_PCL" ]; then ...@@ -40,7 +46,7 @@ if [ -n "$SKIP_PCL" ]; then
NO_PCL_FEATURE="(pushnew :no-pcl *features*)" NO_PCL_FEATURE="(pushnew :no-pcl *features*)"
fi 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 if [ -n "$2" ]; then
VERSION="$2" VERSION="$2"
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment