diff --git a/.travis.yml b/.travis.yml index e9a5116ac..3afa0f02a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,8 @@ language: cpp sudo: required dist: trusty +git: + depth: 9999999 notifications: irc: chat.freenode.net#zoneminder-dev branches: diff --git a/utils/packpack/startpackpack.sh b/utils/packpack/startpackpack.sh index 80fcb5d37..6d9e37b51 100755 --- a/utils/packpack/startpackpack.sh +++ b/utils/packpack/startpackpack.sh @@ -39,6 +39,23 @@ checksanity () { } +# Check key variables before calling packpack +checkvars () { + if [ -z ${VERSION} ]; then + echo + echo "FATAL: VERSION variable was null. Cannot continue." + echo + exit 98 + fi + + if [ -z ${RELEASE} ]; then + echo + echo "FATAL: RELEASE variable was null. Cannot Continue" + echo + exit 98 + fi +} + # Steps common to all builds commonprep () { mkdir -p build @@ -116,12 +133,6 @@ installtrusty () { # This sets the naming convention for the deb packages setdebpkgver () { - - # DEBUG - echo - echo "Output of git describe: $(git describe)" - echo "Output of git describe --debug --long --always: $(git describe --long --always --debug)" - echo "Output of git describe --long --always: $(git describe --long --always)" # Set VERSION to x.xx.x+x e.g. 1.30.2+15 # the last x is number of commits since release @@ -131,6 +142,8 @@ setdebpkgver () { export VERSION="$zmver+$commitnum" export RELEASE="${DIST}" + checkvars + echo echo "Packpack VERSION has been set to: ${VERSION}" echo "Packpack RELEASE has been set to: ${RELEASE}" @@ -160,6 +173,8 @@ if [ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${TRAVIS}" != "true" ]; then export VERSION=$(git describe --long --always | sed -n 's/^\([0-9\.]*\)-\([0-9]*\)-\([a-z0-9]*\)/\1/p') export RELEASE=$(git describe --long --always | sed -n 's/^\([0-9\.]*\)-\([0-9]*\)-\([a-z0-9]*\)/\2/p') + checkvars + echo echo "Packpack VERSION has been set to: ${VERSION}" echo "Packpack RELEASE has been set to: ${RELEASE}"