diff --git a/ci/helm-chart/Chart.yaml b/ci/helm-chart/Chart.yaml index 5e7f0eff..7bf6d668 100644 --- a/ci/helm-chart/Chart.yaml +++ b/ci/helm-chart/Chart.yaml @@ -6,5 +6,5 @@ home: https://github.com/notalib/readium-lcp-server keywords: - "lcp" - "readium" -version: "1.0.0" -appVersion: "1.0.0" +version: "1.9.0" +appVersion: "1.9.0" diff --git a/ci/update_chart_version.sh b/ci/update_chart_version.sh new file mode 100755 index 00000000..83fdc1ca --- /dev/null +++ b/ci/update_chart_version.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Retrieve the version from api/common_server.go +APP_VERSION=$(grep "Software_Version = "$1"" ../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" + exit 1 +fi + +if ! command -v yq &> /dev/null +then + echo "yq could not be found, please install it" + exit 1 +fi + +yq eval ".appVersion = \"$APP_VERSION\"" -i helm-chart/Chart.yaml +yq eval ".version = \"$APP_VERSION\"" -i helm-chart/Chart.yaml