update packaging tools to always use revision.cc to determine version number, not text in top level wscript
This commit is contained in:
parent
6992153ae9
commit
3e661d97b5
|
@ -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
|
||||
commit=`echo $r | cut -d- -f2`
|
||||
version=${release_version}${revcount:+.$revcount}
|
||||
|
||||
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
|
||||
|
||||
release_version=${major_version}.${minor_version}${revcount:+.$revcount}
|
||||
|
||||
#
|
||||
# Figure out the Build Type
|
||||
|
|
|
@ -97,8 +97,12 @@ fi
|
|||
|
||||
. ../define_versions.sh
|
||||
|
||||
echo "Version is $version / $commit"
|
||||
info_string="$version ($commit) built on `hostname` by `whoami` on `date`"
|
||||
echo "Version is $release_version"
|
||||
if [ "x$commit" != "x" ] ; then
|
||||
info_string="$release_version ($commit) built on `hostname` by `whoami` on `date`"
|
||||
else
|
||||
info_string="$release_version built on `hostname` by `whoami` on `date`"
|
||||
fi
|
||||
echo "Info string is $info_string"
|
||||
|
||||
# Figure out our CPU type
|
||||
|
@ -134,11 +138,11 @@ fi
|
|||
# setup directory structure
|
||||
|
||||
if [ -z "${BUILDTYPE}" ]; then
|
||||
APPDIR=${APPNAME}_${ARCH}-${version}
|
||||
APP_VER_NAME=${APPNAME}-${version}
|
||||
APPDIR=${APPNAME}_${ARCH}-${release_version}
|
||||
APP_VER_NAME=${APPNAME}-${release_version}
|
||||
else
|
||||
APPDIR=${APPNAME}_${ARCH}-${version}-${BUILDTYPE}
|
||||
APP_VER_NAME=${APPNAME}-${version}-${BUILDTYPE}
|
||||
APPDIR=${APPNAME}_${ARCH}-${release_version}-${BUILDTYPE}
|
||||
APP_VER_NAME=${APPNAME}-${release_version}-${BUILDTYPE}
|
||||
fi
|
||||
|
||||
APPBIN=$APPDIR/bin
|
||||
|
@ -569,7 +573,7 @@ fi
|
|||
#
|
||||
# Add the uninstaller
|
||||
#
|
||||
sed -e "s/%REPLACE_PGM%/${APPNAME}/" -e "s/%REPLACE_VENDOR%/${VENDOR}/" -e "s/%REPLACE_VERSION%/${version}/" -e "s/%REPLACE_TYPE%/${BUILDTYPE}/" < uninstall.sh.in > $APPBIN/${APP_VER_NAME}.uninstall.sh
|
||||
sed -e "s/%REPLACE_PGM%/${APPNAME}/" -e "s/%REPLACE_VENDOR%/${VENDOR}/" -e "s/%REPLACE_VERSION%/${release_version}/" -e "s/%REPLACE_TYPE%/${BUILDTYPE}/" < uninstall.sh.in > $APPBIN/${APP_VER_NAME}.uninstall.sh
|
||||
chmod a+x $APPBIN/${APP_VER_NAME}.uninstall.sh
|
||||
|
||||
#Sanity Check file
|
||||
|
|
|
@ -56,8 +56,8 @@ if [ x$DEBUG = xT ]; then
|
|||
BUILDTYPE="dbg"
|
||||
fi
|
||||
|
||||
X86_BUNDLE="${APPNAME}_x86-${version}"
|
||||
X86_64_BUNDLE="${APPNAME}_x86_64-${version}"
|
||||
X86_BUNDLE="${APPNAME}_x86-${release_version}"
|
||||
X86_64_BUNDLE="${APPNAME}_x86_64-${release_version}"
|
||||
|
||||
if [ ! -z ${BUILDTYPE} ]; then
|
||||
X86_BUNDLE="${X86_BUNDLE}-${BUILDTYPE}"
|
||||
|
@ -112,22 +112,22 @@ fi
|
|||
if [ -z ${BUILDTYPE} ]; then
|
||||
if [ "${SINGLE_ARCH}" = "T" ]; then
|
||||
if [ "${X86_BUNDLE_OK}" = "T" ]; then
|
||||
PACKAGE="${APPNAME}_32bit-${version}"
|
||||
PACKAGE="${APPNAME}_32bit-${release_version}"
|
||||
else
|
||||
PACKAGE="${APPNAME}_64bit-${version}"
|
||||
PACKAGE="${APPNAME}_64bit-${release_version}"
|
||||
fi
|
||||
else
|
||||
PACKAGE="${APPNAME}-${version}"
|
||||
PACKAGE="${APPNAME}-${release_version}"
|
||||
fi
|
||||
else
|
||||
if [ "${SINGLE_ARCH}" = "T" ]; then
|
||||
if [ "${X86_BUNDLE_OK}" = "T" ]; then
|
||||
PACKAGE="${APPNAME}_32bit-${version}-${BUILDTYPE}"
|
||||
PACKAGE="${APPNAME}_32bit-${release_version}-${BUILDTYPE}"
|
||||
else
|
||||
PACKAGE="${APPNAME}_64bit-${version}-${BUILDTYPE}"
|
||||
PACKAGE="${APPNAME}_64bit-${release_version}-${BUILDTYPE}"
|
||||
fi
|
||||
else
|
||||
PACKAGE="${APPNAME}-${version}-${BUILDTYPE}"
|
||||
PACKAGE="${APPNAME}-${release_version}-${BUILDTYPE}"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -75,8 +75,12 @@ if test -z "$PRODUCT_PKG_DIR" -o -z "$APPNAME"; then
|
|||
fi
|
||||
|
||||
. ../define_versions.sh
|
||||
echo "Version is $release_version / $revision"
|
||||
info_string="$version built on `hostname` by `whoami` on `date`"
|
||||
echo "Version is $release_version"
|
||||
if [ "x$commit" != "x" ] ; then
|
||||
info_string="$release_version ($commit) built on `hostname` by `whoami` on `date`"
|
||||
else
|
||||
info_string="$release_version built on `hostname` by `whoami` on `date`"
|
||||
fi
|
||||
echo "Info string is $info_string"
|
||||
|
||||
# setup directory structure
|
||||
|
@ -177,12 +181,12 @@ env="<key>LSEnvironment</key><dict>$env<key>ARDOUR_BUNDLED</key><string>true</st
|
|||
|
||||
# edit plist
|
||||
sed -e "s?@ENV@?$env?g" \
|
||||
-e "s?@VERSION@?$release_version/$revision?g" \
|
||||
-e "s?@VERSION@?$release_version?g" \
|
||||
-e "s?@INFOSTRING@?$info_string?g" < Info.plist.in > Info.plist
|
||||
# and plist strings
|
||||
sed -e "s?@APPNAME@?$appname?" \
|
||||
-e "s?@ENV@?$env?g" \
|
||||
-e "s?@VERSION@?$release_version/$revision?g" \
|
||||
-e "s?@VERSION@?$release_version?g" \
|
||||
-e "s?@INFOSTRING@?$info_string?g" < InfoPlist.strings.in > Resources/InfoPlist.strings || exit 1
|
||||
|
||||
# copy static files
|
||||
|
@ -569,10 +573,10 @@ fi
|
|||
|
||||
echo "Building DMG ..."
|
||||
|
||||
# UC_DMG=$APPNAME-${release_version}-${revision}-UC.dmg
|
||||
# FINAL_DMG=$APPNAME-${release_version}-${revision}.dmg
|
||||
UC_DMG=$APPNAME-$version.dmg
|
||||
VOLNAME=$APPNAME-$version
|
||||
# UC_DMG=$APPNAME-${release_version}-UC.dmg
|
||||
# FINAL_DMG=$APPNAME-${release_version}.dmg
|
||||
UC_DMG=$APPNAME-$release_version.dmg
|
||||
VOLNAME=$APPNAME-$release_version
|
||||
|
||||
# TODO use mktemp
|
||||
export TMPDIR=`pwd`
|
||||
|
|
Loading…
Reference in New Issue
Block a user