From f833e44bd546518d392c784e926a4586193e6518 Mon Sep 17 00:00:00 2001 From: catbref Date: Tue, 1 Sep 2020 10:41:52 +0100 Subject: [PATCH] Update tools/build-zip.sh to reflect updated start.sh, and also to take optional git tag --- tools/build-zip.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tools/build-zip.sh b/tools/build-zip.sh index b5ddea62..111aba21 100755 --- a/tools/build-zip.sh +++ b/tools/build-zip.sh @@ -2,6 +2,12 @@ set -e +# Optional git tag? +if [ $# -ge 1 ]; then + git_tag="$1" + shift +fi + saved_pwd=$PWD # Check we are within a git repo @@ -31,10 +37,12 @@ if [ -z "${project}" ]; then fi # Extract git tag -git_tag=$( git tag --points-at HEAD ) if [ -z "${git_tag}" ]; then - echo "Unable to extract git tag" - exit 1 + git_tag=$( git tag --points-at HEAD ) + if [ -z "${git_tag}" ]; then + echo "Unable to extract git tag" + exit 1 + fi fi build_dir=/tmp/${project} @@ -47,7 +55,8 @@ cp target/${project}*.jar ${build_dir}/${project}.jar git show HEAD:log4j2.properties > ${build_dir}/log4j2.properties -git show HEAD:run.sh > ${build_dir}/run.sh +git show HEAD:start.sh > ${build_dir}/start.sh +git show HEAD:stop.sh > ${build_dir}/stop.sh printf "{\n}\n" > ${build_dir}/settings.json