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