From 0ee6da84c0bf0d45e182577d83baaa635abdedb6 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Mon, 6 Mar 2017 18:41:48 -0600 Subject: [PATCH] set VERSION & RELEASE in trusty build --- utils/packpack/startpackpack.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/utils/packpack/startpackpack.sh b/utils/packpack/startpackpack.sh index f1a692de8..7addb0c2b 100755 --- a/utils/packpack/startpackpack.sh +++ b/utils/packpack/startpackpack.sh @@ -189,6 +189,20 @@ if [ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${TRAVIS}" != "true" ]; then # We were not triggered via cron so just build and test trusty elif [ "${OS}" == "ubuntu" ] && [ "${DIST}" == "trusty" ]; then 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 movecrud