2019-09-25 10:31:12 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Updates the versions in helm charts to reflect the current
|
|
|
|
# version.
|
|
|
|
|
|
|
|
VERSION=$1
|
|
|
|
|
|
|
|
if [ -z $VERSION ]; then
|
|
|
|
echo "Specify a version argument"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
function replaceInFile {
|
|
|
|
local EXPR=$1
|
|
|
|
local FILE=$2
|
2023-06-05 12:18:04 +00:00
|
|
|
sed -i --expression "${EXPR}" ${FILE}
|
2019-09-25 10:31:12 +00:00
|
|
|
}
|
|
|
|
|
2024-07-23 11:08:44 +00:00
|
|
|
for f in kube-arangodb kube-arangodb-enterprise kube-arangodb-arm64 kube-arangodb-enterprise-arm64 kube-arangodb-crd; do
|
2019-09-25 10:31:12 +00:00
|
|
|
replaceInFile "s@^version: .*\$@version: ${VERSION}@g" "chart/${f}/Chart.yaml"
|
|
|
|
if [[ -f "chart/${f}/values.yaml" ]]; then
|
2024-09-11 08:12:52 +00:00
|
|
|
replaceInFile "s@^ image: arangodb/kube-arangodb:[[:digit:]].*\$@ image: arangodb/kube-arangodb:${VERSION}@g" "chart/${f}/values.yaml"
|
|
|
|
replaceInFile "s@^ image: arangodb/kube-arangodb-enterprise:[[:digit:]].*\$@ image: arangodb/kube-arangodb-enterprise:${VERSION}@g" "chart/${f}/values.yaml"
|
2019-09-25 10:31:12 +00:00
|
|
|
fi
|
|
|
|
done
|