Move base checkout into loop

This commit is contained in:
David Tolnay 2022-04-24 18:49:29 -07:00
parent 89849aa1e8
commit 314c329137
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82

View file

@ -8,14 +8,15 @@ if ! git diff-index --quiet HEAD; then
fi
base=$(git rev-parse HEAD)
git checkout --quiet "$base"
for rev in 1.{0..70}.0 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
git add action.yml
git commit --quiet --message "toolchain: $rev"
git checkout --quiet -b $rev
git checkout --quiet "$base"
done
git checkout --quiet "$base"