set VERSION & RELEASE in trusty build

This commit is contained in:
Andrew Bauer 2017-03-06 18:41:48 -06:00
parent 0cf94c3573
commit 0ee6da84c0
1 changed files with 14 additions and 0 deletions

View File

@ -189,6 +189,20 @@ if [ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${TRAVIS}" != "true" ]; then
# We were not triggered via cron so just build and test trusty # We were not triggered via cron so just build and test trusty
elif [ "${OS}" == "ubuntu" ] && [ "${DIST}" == "trusty" ]; then elif [ "${OS}" == "ubuntu" ] && [ "${DIST}" == "trusty" ]; then
echo "Begin Ubuntu Trusty build..." echo "Begin Ubuntu Trusty build..."
# Set VERSION to x.xx.x+x e.g. 1.30.2+15
# the last x is number of commits since release
# Creates zoneminder packages in the format: zoneminder-{version}-{release}
zmver=$(git describe --long --always | sed -n 's/^\([0-9\.]*\)-\([0-9]*\)-\([a-z0-9]*\)/\1/p')
commitnum=$(git describe --long --always | sed -n 's/^\([0-9\.]*\)-\([0-9]*\)-\([a-z0-9]*\)/\2/p')
export VERSION="$zmver+$commitnum"
export RELEASE="${DIST}"
echo
echo "Packpack VERSION has been set to: ${VERSION}"
echo "Packpack RELEASE has been set to: ${RELEASE}"
echo
commonprep commonprep
movecrud movecrud