From e8c8f9294056a177371dc3bfda5499d9a439e786 Mon Sep 17 00:00:00 2001 From: Shlomo Zalman Heigh Date: Fri, 15 Nov 2024 11:52:26 -0500 Subject: [PATCH] Allow build script to run locally --- build.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build.sh b/build.sh index c84aa27..0afb6a5 100755 --- a/build.sh +++ b/build.sh @@ -12,6 +12,12 @@ trap finish EXIT TAG=$(cat docker/tag) +# When running in Jenkins, a VERSION file is automatically added to the repo root. +# When running locally, add one here. +if [ ! -f "$PWD/VERSION" ]; then + echo "0.0.0-dev" > "$PWD/VERSION" +fi + CIDFILE=$(mktemp -u) docker run -v "$PWD":/src:ro --cidfile="$CIDFILE" -e WRITE_ARTIFACTORY_USERNAME -e WRITE_ARTIFACTORY_PASSWORD -e WRITE_ARTIFACTORY_URL "$TAG"