From bb45937a053e097f8591208d8e74c90db1873d07 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 14 Apr 2024 12:01:00 -0700 Subject: [PATCH] Remove toolchain input when toolchain is specified in action rev --- scripts/update-revs.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/update-revs.sh b/scripts/update-revs.sh index c251278..0fbc0cf 100755 --- a/scripts/update-revs.sh +++ b/scripts/update-revs.sh @@ -29,7 +29,11 @@ for rev in `releases` stable beta nightly; do echo "Updating $rev branch" git checkout --quiet "$base" git branch --quiet --delete --force $rev &>/dev/null || true - sed -i "s/required: true/required: false\n default: $rev/" action.yml + if [[ $rev == 1* ]]; then + sed -i "/^ toolchain:/,+2d; s/\${{inputs\.toolchain}}/$rev/" action.yml + else + sed -i "s/required: true/required: false\n default: $rev/" action.yml + fi git add action.yml git commit --quiet --message "toolchain: $rev" git checkout --quiet -b $rev