2013-03-25 09:49:07 -04:00
|
|
|
#
|
2013-05-08 13:16:50 -04:00
|
|
|
# this is sourced by build and package, and executed from within build/{osx,linux}_packaging
|
2013-03-25 09:49:07 -04:00
|
|
|
#
|
|
|
|
|
2013-11-05 09:35:03 -05:00
|
|
|
if uname -a | grep arwin >/dev/null 2>&1 ; then
|
|
|
|
EXTENDED_RE=-E
|
|
|
|
else
|
|
|
|
EXTENDED_RE=-r
|
|
|
|
fi
|
|
|
|
|
2015-01-08 13:26:03 -05:00
|
|
|
GIT_REV_REGEXP='([0-9][0-9]*)\.([0-9][0-9]*)\-?(rc[0-9]*)?-?([0-9][0-9]*)?(-g([a-f0-9]+))?'
|
2013-11-05 09:35:03 -05:00
|
|
|
|
2015-01-08 13:26:03 -05:00
|
|
|
major_version=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\1/"`
|
2013-11-05 09:35:03 -05:00
|
|
|
minor_version=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\2/"`
|
2015-05-07 22:55:34 -04:00
|
|
|
|
|
|
|
# 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)
|
|
|
|
# Tracks does not use -rcN based tagging
|
|
|
|
#
|
2015-01-08 13:26:03 -05:00
|
|
|
rc=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\3/"`
|
2015-05-07 22:55:34 -04:00
|
|
|
|
|
|
|
#
|
|
|
|
# revision count since tag
|
|
|
|
#
|
2015-01-08 13:26:03 -05:00
|
|
|
r=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\4/"`
|
2015-05-07 22:55:34 -04:00
|
|
|
|
|
|
|
#
|
|
|
|
# git short sha1 commit ID
|
|
|
|
#
|
2015-01-08 13:26:03 -05:00
|
|
|
commit=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\6/"`
|
2013-11-05 09:35:03 -05:00
|
|
|
|
2015-01-08 13:26:03 -05:00
|
|
|
if [ "x$rc" != "x" ] ; then
|
|
|
|
revcount=$rc${r:+.$r}
|
|
|
|
elif [ "x$r" != "x" ] ; then
|
2013-11-05 09:35:03 -05:00
|
|
|
revcount=$r
|
2015-04-03 15:19:22 -04:00
|
|
|
else
|
|
|
|
revcount=0
|
2013-04-08 12:32:14 -04:00
|
|
|
fi
|
2013-11-05 09:35:03 -05:00
|
|
|
|
|
|
|
release_version=${major_version}.${minor_version}${revcount:+.$revcount}
|
2013-03-25 09:49:07 -04:00
|
|
|
|
|
|
|
#
|
|
|
|
# Figure out the Build Type
|
|
|
|
#
|
|
|
|
# Note that the name of the cache file may vary from to time
|
|
|
|
#
|
|
|
|
|
|
|
|
if grep -q "DEBUG = True" ../../build/c4che/_cache.py; then
|
|
|
|
DEBUG="T"
|
|
|
|
else
|
|
|
|
DEBUG="F"
|
|
|
|
fi
|