allow to prefix tags with “<text>+”
authorRobin Gareus <robin@gareus.org>
Thu, 2 Apr 2015 21:42:16 +0000 (23:42 +0200)
committerRobin Gareus <robin@gareus.org>
Thu, 2 Apr 2015 21:42:28 +0000 (23:42 +0200)
eg. mixbus+3.0 or mb+3.1-rc1

tools/x-win/package.sh
wscript

index 610830f934817ab765f54d7f3e62d75ab6eb0743..221a07bba4df56bf5a788df13241bf1609568be5 100755 (executable)
@@ -76,9 +76,9 @@ test -f ${SRCDIR}/$1 || curl -k -L -o ${SRCDIR}/$1 $2
 ################################################################################
 set -e
 
-ARDOURVERSION=$(git describe | sed 's/-g.*$//')
+ARDOURVERSION=$(git describe | sed 's/^[A-Za-z]*+//;s/-g.*$//')
 ARDOURDATE=$(date -R)
-BINVERSION=$(git describe | sed 's/-g.*$//;s/\-rc\([^-]*\)-/-rc\1./;s/-/./;s/-.*$//')
+BINVERSION=$(git describe | sed 's/^[A-Za-z]*+//;s/-g.*$//;s/\-rc\([^-]*\)-/-rc\1./;s/-/./;s/-.*$//')
 if ! test -f build/gtk2_ardour/ardour-${BINVERSION}.exe; then
        echo "*** Please compile ardour ${ARDOURVERSION} first."
        exit 1
diff --git a/wscript b/wscript
index 9ffeebd75ec4c0bb9128943faeb87d679c44e582..c30e3f8457a29240e9eea897e2568f0e10dce379 100644 (file)
--- a/wscript
+++ b/wscript
@@ -128,7 +128,7 @@ clang_darwin_dict['full-optimization'] = [ '-O3', '-ffast-math', '-fstrength-red
 compiler_flags_dictionaries['clang-darwin'] = clang_darwin_dict;
 
 def fetch_git_revision ():
-    cmd = "git describe HEAD"
+    cmd = "git describe HEAD | sed 's/^[A-Za-z]*+//'"
     output = subprocess.Popen(cmd, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].splitlines()
     rev = output[0].decode ('utf-8')
     return rev