From 5b86646bd8a3605ea6a9318892030c7505ef4df4 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Mon, 21 Aug 2023 15:55:38 +0200 Subject: [PATCH] added optional arg for updating minimum rust version --- documentation/bump_versions.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/documentation/bump_versions.sh b/documentation/bump_versions.sh index 507af1492e..123705ee7a 100755 --- a/documentation/bump_versions.sh +++ b/documentation/bump_versions.sh @@ -4,6 +4,9 @@ # # e.g if the upcoming platform release was v1.1.29 and the release version 1.2.9 you'd run this as: # `./bump_versions.sh "1.1.29" "1.2.9"` +# +# you can also set the minumum rust version by passing an optional 3rd argument: +# `./bump_versions.sh "1.1.29" "1.2.9" "1.67"` # array of project dirs declare -a projects=("docs" "dev-portal" "operators") @@ -12,6 +15,12 @@ declare -a projects=("docs" "dev-portal" "operators") for i in "${projects[@]}" do # sed the vars in the book.toml file for each project + echo "setting platform and wallet versions in $i" sed -i 's/platform_release_version =.*/platform_release_version = "'$1'"/' "$i"/book.toml sed -i 's/wallet_release_version =.*/wallet_release_version = "'$2'"/' "$i"/book.toml + if [ "$3" ] + then + echo "setting minimum rust version in $i" + sed -i 's/minimum_rust_version = .*/minimum_rust_version = "'$3'"/' "$i"/book.toml + fi done \ No newline at end of file