diff --git a/Makefile b/Makefile index a763a9051..6f358bd82 100644 --- a/Makefile +++ b/Makefile @@ -268,6 +268,10 @@ endif # Release building +.PHONY: patch-readme +patch-readme: + $(ROOTDIR)/scripts/patch_readme.sh $(VERSION_MAJOR_MINOR_PATCH) + .PHONY: update-changelog changelog: docker run -it --rm \ diff --git a/scripts/patch_readme.sh b/scripts/patch_readme.sh new file mode 100755 index 000000000..6532c8388 --- /dev/null +++ b/scripts/patch_readme.sh @@ -0,0 +1,16 @@ +#!/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 + +f=README.md +sed -e "s@^kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/.*/manifests/crd.yaml\$@kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/${VERSION}/manifests/crd.yaml@g" -i "" $f +sed -e "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" -i "" $f +sed -e "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" -i "" $f diff --git a/tools/release/release.go b/tools/release/release.go index dc796f1ca..42f4be83c 100644 --- a/tools/release/release.go +++ b/tools/release/release.go @@ -62,6 +62,7 @@ func main() { "IMAGETAG": version, "MANIFESTSUFFIX": "-", }) + make("patch-readme", nil) make("build-ghrelease", nil) gitCommitAll(fmt.Sprintf("Updated manifest to %s", version)) // Commit manifest gitTag(version)