2020-03-04 10:25:14 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Updates examples to match current version.
|
|
|
|
|
|
|
|
VERSION=$1
|
|
|
|
|
|
|
|
if [ -z $VERSION ]; then
|
|
|
|
echo "Specify a version argument"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2024-09-11 08:12:52 +00:00
|
|
|
ARANGODB_VERSION=3.12.2
|
2020-03-04 10:25:14 +00:00
|
|
|
|
|
|
|
function replaceInFile {
|
|
|
|
local EXPR=$1
|
|
|
|
local FILE=$2
|
2023-06-05 12:18:04 +00:00
|
|
|
sed -E -i --expression "${EXPR}" ${FILE}
|
2020-03-04 10:25:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
FILES=$(find ./examples -type f -name '*.yaml')
|
|
|
|
|
|
|
|
for FILE in ${FILES}; do
|
|
|
|
replaceInFile "s@arangodb/arangodb:[0-9]+\\.[0-9]+\\.[0-9]+@arangodb/arangodb:${ARANGODB_VERSION}@g" ${FILE}
|
|
|
|
replaceInFile "s@arangodb/enterprise:[0-9]+\\.[0-9]+\\.[0-9]+@arangodb/enterprise:${ARANGODB_VERSION}@g" ${FILE}
|
|
|
|
replaceInFile "s@arangodb/kube-arangodb:[0-9]+\\.[0-9]+\\.[0-9]+@arangodb/kube-arangodb:${VERSION}@g" ${FILE}
|
2022-10-26 21:44:21 +00:00
|
|
|
replaceInFile "s@arangodb/kube-arangodb-enterprise:[0-9]+\\.[0-9]+\\.[0-9]+@arangodb/kube-arangodb-enterprise:${VERSION}@g" ${FILE}
|
2020-03-04 10:25:14 +00:00
|
|
|
done
|