diff options
author | Robin Gareus <robin@gareus.org> | 2015-01-08 19:26:03 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-01-08 20:18:09 +0100 |
commit | c1ccf8e28ec6d11508c0ae6c9d1265dbe71f15be (patch) | |
tree | 026eb6bc1a4cec4f5499719bf981fd5ed1a7d6cd /tools/define_versions.sh | |
parent | 87f5f333ce4add0c8b0661db0fde8fc5ac86a0d0 (diff) |
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
Diffstat (limited to 'tools/define_versions.sh')
-rw-r--r-- | tools/define_versions.sh | 13 |
1 files changed, 8 insertions, 5 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 |