2 # this is sourced by build and package, and executed from within build/{osx,linux}_packaging
5 if uname -a | grep arwin >/dev/null 2>&1 ; then
11 GIT_REV_REGEXP='([0-9][0-9]*)\.([0-9][0-9]*)\-?([pr][rc]e?[0-9]*)?-?([0-9][0-9]*)?(-g([a-f0-9]+))?'
13 major_version=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\1/"`
14 minor_version=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\2/"`
16 # Tracks tags with "MAJOR.MINOR.MICRO"
17 # Ardour doesn't use this
19 micro_version=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\3/"`
22 # RC e.g. 8.1-rc3 (optional)
24 # PRE e.g. 9.3-pre0 (optional)
26 # Tracks does not use -rcN based tagging
28 rc=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\3/"`
31 # revision count since tag
33 r=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\4/"`
36 # git short sha1 commit ID
38 commit=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\6/"`
40 if [ "x$rc" != "x" ] ; then
42 elif [ "x$r" != "x" ] ; then
48 release_version=${major_version}.${minor_version}${revcount:+.$revcount}
51 # Figure out the Build Type
53 # Note that the name of the cache file may vary from to time
56 if grep -q "DEBUG = True" ../../build/c4che/_cache.py; then