Update startpackpack.sh
Remove packpack debug output, add a sanity check for the version & release vars
This commit is contained in:
parent
590dd13be5
commit
8f9a373825
|
@ -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,14 +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)"
|
||||
echo "Output of git tag -n: $(git tag -n)"
|
||||
echo
|
||||
|
||||
# Set VERSION to x.xx.x+x e.g. 1.30.2+15
|
||||
# the last x is number of commits since release
|
||||
|
@ -133,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}"
|
||||
|
@ -162,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}"
|
||||
|
|
Loading…
Reference in New Issue