ctdb-mkversion: Support external VERSION specification
authorAmitay Isaacs <amitay@gmail.com>
Sun, 25 May 2014 02:00:59 +0000 (12:00 +1000)
committerMichael Adam <obnox@samba.org>
Fri, 20 Jun 2014 21:38:09 +0000 (23:38 +0200)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
ctdb/packaging/mkversion.sh

index bc50165f9820709e919cfb28b8aa71ed119cf978..e4a37adb654930c747f1203349f19905d8f4942e 100755 (executable)
@@ -28,12 +28,17 @@ if [ -z "$OUTPUT" ]; then
     OUTPUT="include/ctdb_version.h"
 fi
 
+VERSION=$2
+RELEASE=1
+
 # We use tags and determine the version, as follows:
 # ctdb-0.9.1  (First release of 0.9).
 # ctdb-0.9.23 (23rd minor release of the 112 version)
 #
 # If we're not directly on a tag, this is a devel release; we append
 # .0.<patchnum>.<checksum>.devel to the release.
+if [ -z "$VERSION" ]; then
+
 TAG=`git describe --match "samba-*"`
 case "$TAG" in
     samba-*)
@@ -56,6 +61,8 @@ case "$TAG" in
        ;;
 esac
 
+fi
+
 cat > "$OUTPUT" <<EOF
 /* This file is auto-genrated by packaging/mkversion.sh */