From c1ccf8e28ec6d11508c0ae6c9d1265dbe71f15be Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 8 Jan 2015 19:26:03 +0100 Subject: prepare for release candidate tags: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit regexp: /[0—9]+-[0-9]+(-rc[0-9]*)?/ -[-rc[]] valid tag examples: 4.0, 4.1-rc3, 5.0-rc --- tools/define_versions.sh | 13 ++++++++----- tools/x-win/package.sh | 2 +- wscript | 10 +++++----- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/tools/define_versions.sh b/tools/define_versions.sh index 654617a253..c2f912d16d 100644 --- a/tools/define_versions.sh +++ b/tools/define_versions.sh @@ -8,14 +8,17 @@ else EXTENDED_RE=-r fi -GIT_REV_REGEXP='([0-9][0-9]*)\.([0-9][0-9]*)-?([0-9][0-9]*)?-?([a-z0-9]*)' +GIT_REV_REGEXP='([0-9][0-9]*)\.([0-9][0-9]*)\-?(rc[0-9]*)?-?([0-9][0-9]*)?(-g([a-f0-9]+))?' -major_version=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\1/"` +major_version=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\1/"` minor_version=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\2/"` -r=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\3/"` -commit=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\4/"` +rc=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\3/"` +r=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\4/"` +commit=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\6/"` -if [ "x$r" != "x" ] ; then +if [ "x$rc" != "x" ] ; then + revcount=$rc${r:+.$r} +elif [ "x$r" != "x" ] ; then revcount=$r fi diff --git a/tools/x-win/package.sh b/tools/x-win/package.sh index 023c5ca645..cc1966ca15 100755 --- a/tools/x-win/package.sh +++ b/tools/x-win/package.sh @@ -70,7 +70,7 @@ set -e ARDOURVERSION=$(git describe | sed 's/-g.*$//') ARDOURDATE=$(date -R) -BINVERSION=$(git describe | sed 's/-g.*$//' | sed 's/-/./') +BINVERSION=$(git describe | sed '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 aecc85a5c2..e545b42b61 100644 --- a/wscript +++ b/wscript @@ -147,16 +147,16 @@ else: rev = fetch_tarball_revision () # -# rev is now of the form MAJOR.MINOR-rev-commit -# or, if right at the same rev as a release, MAJOR.MINOR +# rev is now of the form MAJOR.MINOR[-rcX]-rev-commit +# or, if right at the same rev as a release, MAJOR.MINOR[-rcX] # -parts = rev.split ('.') +parts = rev.split ('.', 1) MAJOR = parts[0] -other = parts[1].split ('-') +other = parts[1].split('-', 1) MINOR = other[0] if len(other) > 1: - MICRO = other[1] + MICRO = other[1].rsplit('-',1)[0].replace('-','.') else: MICRO = '0' -- cgit v1.2.3