From 8e74ce7097de2ca477428f7a09a266db315caaa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Unai=20Arr=C3=ADen?= Date: Wed, 1 Jun 2022 18:50:00 +0200 Subject: [PATCH] Configure BUILDTOOL_IMAGE (#16) * Configure BUILDTOOL_IMAGE * Fix CICD version management * Update bin/change-version.sh * Apply suggestions from code review --- .gitignore | 1 - Makefile | 2 +- bin/change-version.sh | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100755 bin/change-version.sh diff --git a/.gitignore b/.gitignore index 3e6d0df7..1224ce1e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ *.dll *.so *.dylib -bin # Test binary, build with `go test -c` *.test diff --git a/Makefile b/Makefile index ce5a810a..7b2040d7 100644 --- a/Makefile +++ b/Makefile @@ -156,4 +156,4 @@ e2e/%: # Stratio CICD flow change-version: - @echo $(VERSION) > VERSION \ No newline at end of file + bin/change-version.sh $(version) diff --git a/bin/change-version.sh b/bin/change-version.sh new file mode 100755 index 00000000..b98b061f --- /dev/null +++ b/bin/change-version.sh @@ -0,0 +1,17 @@ +#!/bin/bash -e + +BASEDIR="$(realpath "$(dirname "$0")/..")" + +cd "$BASEDIR" + +PATH=$(pwd)/dist:$PATH + +if [[ -z "$1" ]]; then + VERSION=$(<"$BASEDIR/VERSION") +else + VERSION=$1 +fi + +echo "Modifying Capsule version to: $VERSION" + +echo "$VERSION" > VERSION