Skip to content
Permalink
Browse files

Update release helpers

  • Loading branch information
pleshakov committed Jan 14, 2020
1 parent 7d2898c commit 21203e3b182674796436adc6f72445314f51bbb2
Showing with 22 additions and 4 deletions.
  1. +1 −1 hack/changelog-template.txt
  2. +6 −1 hack/prepare-minor-release-in-master.sh
  3. +15 −2 hack/prepare-minor-release.sh
@@ -1,5 +1,5 @@

### %%IC_VERSION%%
%%TITLE%%

CHANGES:
* Update NGINX version to X.Y.Z.
@@ -23,5 +23,10 @@ prev_helm_chart_version=$(echo $helm_chart_version | awk -F. '{ printf("%s.%s.%d

sed -i "" "s/$prev_ic_version/$ic_version/g" README.md

# update repo CHANGELOG
sed -i "" "1r hack/changelog-template.txt" CHANGELOG.md
sed -i "" -e "s/%%IC_VERSION%%/$ic_version/g" -e "s/%%HELM_CHART_VERSION%%/$helm_chart_version/g" CHANGELOG.md
sed -i "" -e "s/%%TITLE%%/### $ic_version/g" -e "s/%%IC_VERSION%%/$ic_version/g" -e "s/%%HELM_CHART_VERSION%%/$helm_chart_version/g" CHANGELOG.md

# update docs CHANGELOG
sed -i "" "1r hack/changelog-template.txt" docs-web/releases.md
sed -i "" -e "s/%%TITLE%%/## NGINX Ingress Controller $ic_version/g" -e "s/%%IC_VERSION%%/$ic_version/g" -e "s/%%HELM_CHART_VERSION%%/$helm_chart_version/g" docs-web/releases.md
@@ -11,7 +11,6 @@
FILES_TO_UPDATE_IC_VERSION=(
Makefile
README.md
build/README.md
deployments/daemon-set/nginx-ingress.yaml
deployments/daemon-set/nginx-plus-ingress.yaml
deployments/deployment/nginx-ingress.yaml
@@ -25,6 +24,8 @@ FILES_TO_UPDATE_IC_VERSION=(

FILE_TO_UPDATE_HELM_CHART_VERSION=( deployments/helm-chart/Chart.yaml )

DOCS_TO_UPDATE_FOLDER=docs-web

if [ $# != 2 ];
then
echo "Invalid number of arguments" 1>&2
@@ -41,5 +42,17 @@ prev_helm_chart_version=$(echo $helm_chart_version | awk -F. '{ printf("%s.%s.%d
sed -i "" "s/$prev_ic_version/$ic_version/g" ${FILES_TO_UPDATE_IC_VERSION[*]}
sed -i "" "s/$prev_helm_chart_version/$helm_chart_version/g" ${FILE_TO_UPDATE_HELM_CHART_VERSION[*]}

# update repo CHANGELOG
sed -i "" "1r hack/changelog-template.txt" CHANGELOG.md
sed -i "" -e "s/%%IC_VERSION%%/$ic_version/g" -e "s/%%HELM_CHART_VERSION%%/$helm_chart_version/g" CHANGELOG.md
sed -i "" -e "s/%%TITLE%%/### $ic_version/g" -e "s/%%IC_VERSION%%/$ic_version/g" -e "s/%%HELM_CHART_VERSION%%/$helm_chart_version/g" CHANGELOG.md

# update docs CHANGELOG
sed -i "" "1r hack/changelog-template.txt" $DOCS_TO_UPDATE_FOLDER/releases.md
sed -i "" -e "s/%%TITLE%%/## NGINX Ingress Controller $ic_version/g" -e "s/%%IC_VERSION%%/$ic_version/g" -e "s/%%HELM_CHART_VERSION%%/$helm_chart_version/g" $DOCS_TO_UPDATE_FOLDER/releases.md

# update docs
find $DOCS_TO_UPDATE_FOLDER -type f -name "*.md" -exec sed -i "" "s/v$prev_ic_version/v$ic_version/g" {} +
find $DOCS_TO_UPDATE_FOLDER -type f -name "*.rst" -exec sed -i "" "s/v$prev_ic_version/v$ic_version/g" {} +

# update IC version in the helm doc
sed -i "" "s/$prev_ic_version/$ic_version/g" $DOCS_TO_UPDATE_FOLDER/installation/installation-with-helm.md

0 comments on commit 21203e3

Please sign in to comment.
You can’t perform that action at this time.