prepare for release candidate tags:

regexp: /[0—9]+-[0-9]+(-rc[0-9]*)?/
<Major>-<Minor>[-rc[<num>]]
valid tag examples: 4.0, 4.1-rc3, 5.0-rc
This commit is contained in:
Robin Gareus 2015-01-08 19:26:03 +01:00
parent 87f5f333ce
commit c1ccf8e28e
3 changed files with 14 additions and 11 deletions

View file

@ -8,14 +8,17 @@ else
EXTENDED_RE=-r EXTENDED_RE=-r
fi 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/"` 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/"` rc=`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/"` 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 revcount=$r
fi fi

View file

@ -70,7 +70,7 @@ set -e
ARDOURVERSION=$(git describe | sed 's/-g.*$//') ARDOURVERSION=$(git describe | sed 's/-g.*$//')
ARDOURDATE=$(date -R) 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 if ! test -f build/gtk2_ardour/ardour-${BINVERSION}.exe; then
echo "*** Please compile ardour ${ARDOURVERSION} first." echo "*** Please compile ardour ${ARDOURVERSION} first."
exit 1 exit 1

10
wscript
View file

@ -147,16 +147,16 @@ else:
rev = fetch_tarball_revision () rev = fetch_tarball_revision ()
# #
# rev is now of the form MAJOR.MINOR-rev-commit # rev is now of the form MAJOR.MINOR[-rcX]-rev-commit
# or, if right at the same rev as a release, MAJOR.MINOR # or, if right at the same rev as a release, MAJOR.MINOR[-rcX]
# #
parts = rev.split ('.') parts = rev.split ('.', 1)
MAJOR = parts[0] MAJOR = parts[0]
other = parts[1].split ('-') other = parts[1].split('-', 1)
MINOR = other[0] MINOR = other[0]
if len(other) > 1: if len(other) > 1:
MICRO = other[1] MICRO = other[1].rsplit('-',1)[0].replace('-','.')
else: else:
MICRO = '0' MICRO = '0'