diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-11-05 09:35:03 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-11-05 09:35:03 -0500 |
commit | 3e661d97b57047144336253f79d679a7300aead8 (patch) | |
tree | 886849e292a7f9da77006621d1ac474a4273b85d /tools/define_versions.sh | |
parent | 6992153ae974e52fe2ed6152cad346c8eb6beea0 (diff) |
update packaging tools to always use revision.cc to determine version number, not text in top level wscript
Diffstat (limited to 'tools/define_versions.sh')
-rw-r--r-- | tools/define_versions.sh | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/tools/define_versions.sh b/tools/define_versions.sh index 6f5c17773c..654617a253 100644 --- a/tools/define_versions.sh +++ b/tools/define_versions.sh @@ -2,15 +2,24 @@ # this is sourced by build and package, and executed from within build/{osx,linux}_packaging # -major_version=`grep -m 1 '^MAJOR = ' ../../wscript | awk '{print $3}' | sed "s/'//g"` -minor_version=`grep -m 1 '^MINOR = ' ../../wscript | awk '{print $3}' | sed "s/'//g"` -release_version=${major_version}.${minor_version} -r=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed -e 1d -e "s/[0-9][0-9]*\.[0-9][0-9]*-//"` -if echo $r | grep -q -e - ; then - revcount=`echo $r | cut -d- -f1` +if uname -a | grep arwin >/dev/null 2>&1 ; then + EXTENDED_RE=-E +else + EXTENDED_RE=-r +fi + +GIT_REV_REGEXP='([0-9][0-9]*)\.([0-9][0-9]*)-?([0-9][0-9]*)?-?([a-z0-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/"` +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/"` + +if [ "x$r" != "x" ] ; then + revcount=$r fi -commit=`echo $r | cut -d- -f2` -version=${release_version}${revcount:+.$revcount} + +release_version=${major_version}.${minor_version}${revcount:+.$revcount} # # Figure out the Build Type |