X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=tools%2Fdefine_versions.sh;h=37eca614f326044c60e0a2cdebdbea3327168a08;hb=1be3301342c74fdbb92febcbc85e8d60fb09de0e;hp=9acf95a650b181bdd9a2f0572781fbd41105f784;hpb=aae2f9fb4d2771482098b1989cd1c4c6c0804c98;p=ardour.git diff --git a/tools/define_versions.sh b/tools/define_versions.sh index 9acf95a650..37eca614f3 100644 --- a/tools/define_versions.sh +++ b/tools/define_versions.sh @@ -8,12 +8,33 @@ else EXTENDED_RE=-r fi -GIT_REV_REGEXP='([0-9][0-9]*)\.([0-9][0-9]*)\-?(rc[0-9]*)?-?([0-9][0-9]*)?(-g([a-f0-9]+))?' +GIT_REV_REGEXP='([0-9][0-9]*)\.([0-9][0-9]*)\-?([pr][rc]e?[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/"` minor_version=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\2/"` + +# Tracks tags with "MAJOR.MINOR.MICRO" +# Ardour doesn't use this + +micro_version=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\3/"` + +# +# RC e.g. 8.1-rc3 (optional) +# OR +# PRE e.g. 9.3-pre0 (optional) +# +# Tracks does not use -rcN based tagging +# rc=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\3/"` + +# +# revision count since tag +# r=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\4/"` + +# +# git short sha1 commit ID +# commit=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\6/"` if [ "x$rc" != "x" ] ; then