From fce6baff8422e8de9c3f4b33e557c55e3e34ebee Mon Sep 17 00:00:00 2001 From: Raymond Toy <toy.raymond@gmail.com> Date: Mon, 10 Oct 2011 21:02:43 -0700 Subject: [PATCH] Cleanup version stuff and fix bug. o Add git hash to default version o Remove CVS o Fix bug where the default version wasn't actually used when a version string wasn't given. --- tools/load-world.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/load-world.sh b/tools/load-world.sh index 672a357d5..288e40c04 100755 --- a/tools/load-world.sh +++ b/tools/load-world.sh @@ -11,8 +11,10 @@ usage() SKIP_PCL= NO_PCL_FEATURE= -# Default version is the date. -VERSION="CVS Head `date '+%Y-%m-%d %H:%M:%S'`" +# 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}" +echo $VERSION while getopts "p" arg do @@ -40,7 +42,7 @@ fi # If version string give, use it, otherwise use the default. if [ -n "$2" ]; then - VERSION=$2 + VERSION="$2" fi $TARGET/lisp/lisp -core $TARGET/lisp/kernel.core <<EOF @@ -57,6 +59,6 @@ $TARGET/lisp/lisp -core $TARGET/lisp/kernel.core <<EOF $NO_PCL_FEATURE (load "target:tools/worldload") -$2 +$VERSION EOF -- GitLab