From fa15a10353c4169c92b02ced637b6123710c6a4d Mon Sep 17 00:00:00 2001 From: Casey Waldren Date: Mon, 8 Jan 2024 16:01:07 -0800 Subject: [PATCH] add README updating back to update-versions.sh --- release-please-config.json | 3 ++- scripts/update-versions.sh | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/release-please-config.json b/release-please-config.json index 306a8b1..61b46b6 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -7,7 +7,8 @@ "extra-files": [ "launchdarkly-server-sdk.c", ".github/actions/ci/action.yml", - "README.md" + "README.md", + "scripts/update-versions.sh" ] } } diff --git a/scripts/update-versions.sh b/scripts/update-versions.sh index 380824a..4c44d74 100755 --- a/scripts/update-versions.sh +++ b/scripts/update-versions.sh @@ -84,6 +84,13 @@ for file in "$input_rockspec"-*.rockspec; do rm -f "$new_file_name.bak" + # Update README.md to replace $file with the new filename, which will result in the codesample having the new + # version number. + sed -i.bak "s/$file/$new_file_name/" README.md + echo "Updated README.md code example" + rm -f README.md.bak + + if [ "$(git status --porcelain | wc -l)" -gt 0 ]; then if [ -n "$git_username" ]; then git config user.name "$git_username"