From 75f12612846b5065bf3fc3b87cb09ca9506fd289 Mon Sep 17 00:00:00 2001 From: Paul Liverman Date: Mon, 29 Dec 2014 21:06:50 -0800 Subject: [PATCH] fix #14 autoNumberBuilds added --- build | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/build b/build index 4d71ce0..96d4b58 100644 --- a/build +++ b/build @@ -11,6 +11,22 @@ set -o errexit #fi 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 # not sure if this is the best way to do this or not if ! which zip; then