diff --git a/ci/update_chart_version.sh b/ci/update_chart_version.sh index d3d6c755..75ea69e7 100755 --- a/ci/update_chart_version.sh +++ b/ci/update_chart_version.sh @@ -1,7 +1,11 @@ #!/bin/bash +set -e + +GIT_ROOT="$(git rev-parse --show-toplevel)" + # Retrieve the version from api/common_server.go -APP_VERSION=$(grep "Software_Version = "$1"" ../api/common_server.go | awk '{print $3}' | sed 's/"//g') +APP_VERSION=$(grep "Software_Version = "$1"" $GIT_ROOT/api/common_server.go | awk '{print $3}' | sed 's/"//g') if [ -z "$APP_VERSION" ]; then echo "Error: Could not find version in api/common_server.go" @@ -14,7 +18,7 @@ then exit 1 fi -yq eval ".appVersion = \"$APP_VERSION\"" -i helm-chart/Chart.yaml -yq eval ".version = \"$APP_VERSION\"" -i helm-chart/Chart.yaml +yq eval ".appVersion = \"$APP_VERSION\"" -i $GIT_ROOT/ci/helm-chart/Chart.yaml +yq eval ".version = \"$APP_VERSION\"" -i $GIT_ROOT/ci/helm-chart/Chart.yaml echo $APP_VERSION