From 90e6ea119f757b14b9037da1d511f04754539898 Mon Sep 17 00:00:00 2001 From: Ewout Prangsma Date: Tue, 3 Apr 2018 09:11:44 +0200 Subject: [PATCH] Patch latest version number in README --- Makefile | 4 ++++ scripts/patch_readme.sh | 16 ++++++++++++++++ tools/release/release.go | 1 + 3 files changed, 21 insertions(+) create mode 100755 scripts/patch_readme.sh diff --git a/Makefile b/Makefile index 7228ffb77..b8587a435 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: docker-push docker-push: docker ifneq ($(DOCKERNAMESPACE), arangodb) 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 e51b4b484..4ef390cc7 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)