From 8f1a7365b203b57a573203c149b195fc4c569638 Mon Sep 17 00:00:00 2001 From: Armel Soro Date: Mon, 20 Feb 2023 12:46:09 +0100 Subject: [PATCH] Make the bump-version.sh also update version in documentation sample outputs --- scripts/bump-version.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh index 8df7bc5ae3e..92e200d591f 100755 --- a/scripts/bump-version.sh +++ b/scripts/bump-version.sh @@ -34,6 +34,15 @@ echo "* Bumping version in Dockerfile.rhel" sed -i "s/\(version=\).*/\1${NEW_VERSION}/g" Dockerfile.rhel check_version Dockerfile.rhel +echo "* Bumping version in documentation sample outputs" +# globstar: allows the '**' to recursively try to find file and directories +# nullglob: filename patterns that don't match any filenames are expanded to nothing rather than remaining unexpanded. +shopt -s globstar nullglob +for file in ./docs/website/docs/**/docs-mdx/**/*.mdx; do + sed -i 's/\(odo version: v\).*/\1'"${NEW_VERSION}"'/g' "$file" +done + +echo echo "****************************************************************************************" echo "* Don't forget to update homebrew package at https://github.com/kadel/homebrew-odo ! *" echo "****************************************************************************************"