Skip to content

Commit

Permalink
chor(ci): script to update Chart.Version & Chart.AppVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
ddfreiling committed May 1, 2024
1 parent bf6af23 commit b5192b5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ci/helm-chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
18 changes: 18 additions & 0 deletions ci/update_chart_version.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b5192b5

Please sign in to comment.