Skip to content

Commit

Permalink
fix(ci): chart version script
Browse files Browse the repository at this point in the history
  • Loading branch information
ddfreiling committed May 6, 2024
1 parent 0389e6b commit 43f630b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ci/update_chart_version.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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

0 comments on commit 43f630b

Please sign in to comment.