Skip to content

Commit

Permalink
Updated replacement logic in release scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
LorcanMcVeigh authored May 21, 2020
1 parent 05ec856 commit 5cf5cb7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hack/changelog-template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ HELM CHART:
* The version of the Helm chart is now %%HELM_CHART_VERSION%%.

UPGRADE:
* For NGINX, use the %%IC_VERSION%% image from our DockerHub: `nginx/nginx-ingress:%%IC_VERSION%%` or `nginx/nginx-ingress:%%IC_VERSION%%-alpine`
* For NGINX, use the %%IC_VERSION%% image from our DockerHub: `nginx/nginx-ingress:%%IC_VERSION%%`, `nginx/nginx-ingress:%%IC_VERSION%%-alpine` or 'nginx/nginx-ingress:%%IC_VERSION%%-ubi
* For NGINX Plus, please build your own image using the %%IC_VERSION%% source code.
* For Helm, use version %%HELM_CHART_VERSION%% of the chart.
10 changes: 8 additions & 2 deletions hack/prepare-minor-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ fi
ic_version=$1
helm_chart_version=$2

prev_ic_version=$(echo $ic_version | awk -F. '{ printf("%s.%s.%d", $1, $2, $3-1) }')
prev_helm_chart_version=$(echo $helm_chart_version | awk -F. '{ printf("%s.%s.%d", $1, $2, $3-1) }')
prev_ic_version=$(echo $ic_version | awk -F. '{ printf("%s\\.%s\\.%d", $1, $2, $3-1) }')
prev_helm_chart_version=$(echo $helm_chart_version | awk -F. '{ printf("%s\\.%s\\.%d", $1, $2, $3-1) }')

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[*]}
Expand All @@ -54,5 +54,11 @@ sed -i "" -e "s/%%TITLE%%/## NGINX Ingress Controller $ic_version/g" -e "s/%%IC_
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 technical-specification doc
sed -i "" "s/$prev_ic_version/$ic_version/g" $DOCS_TO_UPDATE_FOLDER/technical-specifications.md

# update IC version in the building ingress controller doc
sed -i "" "s/$prev_ic_version/$ic_version/g" $DOCS_TO_UPDATE_FOLDER/installation/building-ingress-controller-image.md

# 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 5cf5cb7

Please sign in to comment.