summaryrefslogtreecommitdiff
path: root/tools/define_versions.sh
blob: 6f5c17773cbdcaec32c404e89b054fcedd11fd89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# 
# 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`
fi
commit=`echo $r | cut -d- -f2`
version=${release_version}${revcount:+.$revcount}

#
# 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