From bf0757d1605ea4c9033d5c549a9e7c260dd700ee Mon Sep 17 00:00:00 2001 From: RJ Ascani Date: Fri, 30 Jan 2026 16:59:50 -0800 Subject: [PATCH] Automate documentation branch updates for releases The release script now finds and updates all docs that reference viable/strict, rather than relying on a hardcoded file list that can miss new documentation (as happened in #16722). Authored with Claude. --- scripts/release/apply-release-changes.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/release/apply-release-changes.sh b/scripts/release/apply-release-changes.sh index b35e55787ed..a880687ddaf 100755 --- a/scripts/release/apply-release-changes.sh +++ b/scripts/release/apply-release-changes.sh @@ -45,9 +45,19 @@ for i in .github/workflows/*.yml; do fi done +# Update documentation to use release branch instead of viable/strict +echo "Updating documentation branch references" +for doc in $(grep -rl "viable/strict" docs/); do + if [[ "$OSTYPE" == "darwin"* ]]; then + sed -i '' -e "s#-b viable/strict#-b ${RELEASE_BRANCH}#g" "$doc" + else + sed -i -e "s#-b viable/strict#-b ${RELEASE_BRANCH}#g" "$doc" + fi +done + echo "You'll need to manually commit the changes and create a PR. Here are the steps:" -echo "1. Stage the changes to the workflow files:" -echo " git add ./github/workflows/*.yml" +echo "1. Stage the changes:" +echo " git add .github/workflows/*.yml docs/" echo "2. Commit the changes:" echo " git commit -m \"[RELEASE-ONLY CHANGES] Branch Cut for Release ${RELEASE_VERSION}\"" echo "3. After committing, create a pull request to merge the changes."