2018-04-03 07:11:44 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Updates the installation instructions in README.md to reflect the current
|
|
|
|
# version.
|
|
|
|
|
|
|
|
VERSION=$1
|
|
|
|
|
|
|
|
if [ -z $VERSION ]; then
|
|
|
|
echo "Specify a version argument"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2018-09-25 13:51:46 +00:00
|
|
|
function replaceInFile {
|
|
|
|
local EXPR=$1
|
|
|
|
local FILE=$2
|
2023-06-05 12:18:04 +00:00
|
|
|
sed -E -i --expression "${EXPR}" ${FILE}
|
2018-10-31 09:31:07 +00:00
|
|
|
}
|
2018-09-25 13:51:46 +00:00
|
|
|
|
|
|
|
|
2018-04-03 07:11:44 +00:00
|
|
|
f=README.md
|
2022-10-26 21:44:21 +00:00
|
|
|
|
|
|
|
replaceInFile "s@arangodb/kube-arangodb:[0-9]+\.[0-9]+\.[0-9]+@arangodb/kube-arangodb:${VERSION}@g" ${f}
|
|
|
|
replaceInFile "s@arangodb/kube-arangodb-enterprise:[0-9]+\.[0-9]+\.[0-9]+@arangodb/kube-arangodb-enterprise:${VERSION}@g" ${f}
|
|
|
|
|
2018-10-30 16:13:06 +00:00
|
|
|
replaceInFile "s@^kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/.*/manifests/arango-crd.yaml\$@kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/${VERSION}/manifests/arango-crd.yaml@g" ${f}
|
2018-09-25 13:51:46 +00:00
|
|
|
replaceInFile "s@^kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/.*/manifests/arango-deployment.yaml\$@kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/${VERSION}/manifests/arango-deployment.yaml@g" ${f}
|
|
|
|
replaceInFile "s@^kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/.*/manifests/arango-deployment-replication.yaml\$@kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/${VERSION}/manifests/arango-deployment-replication.yaml@g" ${f}
|
|
|
|
replaceInFile "s@^kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/.*/manifests/arango-storage.yaml\$@kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/${VERSION}/manifests/arango-storage.yaml@g" ${f}
|
2018-08-20 14:25:07 +00:00
|
|
|
|
2022-10-26 21:44:21 +00:00
|
|
|
replaceInFile "s@^kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/.*/manifests/enterprise-crd.yaml\$@kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/${VERSION}/manifests/enterprise-crd.yaml@g" ${f}
|
|
|
|
replaceInFile "s@^kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/.*/manifests/enterprise-deployment.yaml\$@kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/${VERSION}/manifests/enterprise-deployment.yaml@g" ${f}
|
|
|
|
replaceInFile "s@^kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/.*/manifests/enterprise-deployment-replication.yaml\$@kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/${VERSION}/manifests/enterprise-deployment-replication.yaml@g" ${f}
|
|
|
|
replaceInFile "s@^kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/.*/manifests/enterprise-storage.yaml\$@kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/${VERSION}/manifests/enterprise-storage.yaml@g" ${f}
|
|
|
|
|
2019-10-31 09:52:45 +00:00
|
|
|
replaceInFile "s@https://github\.com/arangodb/kube-arangodb/releases/download/.*/kube-arangodb-crd-[[:digit:]].*\.tgz@https://github.com/arangodb/kube-arangodb/releases/download/${VERSION}/kube-arangodb-crd-${VERSION}.tgz@g" ${f}
|
2024-08-01 22:03:37 +00:00
|
|
|
replaceInFile "s@https://github\.com/arangodb/kube-arangodb/releases/download/.*/kube-arangodb-enterprise-[[:digit:]].*\.tgz@https://github.com/arangodb/kube-arangodb/releases/download/${VERSION}/kube-arangodb-enterprise-${VERSION}.tgz@g" ${f}
|
2019-10-31 09:52:45 +00:00
|
|
|
replaceInFile "s@https://github\.com/arangodb/kube-arangodb/releases/download/.*/kube-arangodb-[[:digit:]].*\.tgz@https://github.com/arangodb/kube-arangodb/releases/download/${VERSION}/kube-arangodb-${VERSION}.tgz@g" ${f}
|