fix #14 autoNumberBuilds added

This commit is contained in:
Paul Liverman 2014-12-29 21:06:50 -08:00
parent e9869267b7
commit 75f1261284

16
build
View File

@ -11,6 +11,22 @@ set -o errexit
#fi #fi
source ./config.sh source ./config.sh
# append -buildN build numbers
# (build.number file stored in $outputDir)
if [ $autoNumberBuilds = true ]; then
# get the number if file exists, else use 1
if [ ! -r "$outputDir/build.number" ]; then
source "$outputDir/build.number"
((build++))
else
build=1
fi
# store the current build number
echo "build=$build" > "$outputDir/build.number"
# set version to use new build number
version=$version-build$build
fi
# check that zip and unzip are accessible # check that zip and unzip are accessible
# not sure if this is the best way to do this or not # not sure if this is the best way to do this or not
if ! which zip; then if ! which zip; then