[Release] Apply Release changes scripts after release 2.4 (#135495)

Based on additional changes required for https://github.com/pytorch/pytorch/pull/128347
Pull Request resolved: https://github.com/pytorch/pytorch/pull/135495
Approved by: https://github.com/kit1980
This commit is contained in:
atalman
2024-09-09 16:49:04 +00:00
committed by PyTorch MergeBot
parent 011cae9570
commit 0eb425a563

View File

@ -17,19 +17,25 @@ GIT_TOP_DIR=$(git rev-parse --show-toplevel)
RELEASE_VERSION=${RELEASE_VERSION:-$(cut -d'.' -f1-2 "${GIT_TOP_DIR}/version.txt")}
DRY_RUN=${DRY_RUN:-enabled}
# Change all GitHub Actions to reference the test-infra release branch
# as opposed to main.
echo "Applying to workflows"
for i in .github/workflows/*.yml; do
sed -i -e s#@main#@"release/${RELEASE_VERSION}"# $i;
done
# Change all checkout step in templates to not add ref to checkout
echo "Applying to templates"
for i in .github/templates/*.yml.j2; do
sed -i 's#common.checkout(\(.*\))#common.checkout(\1, checkout_pr_head=False)#' $i;
sed -i -e s#main#"release/${RELEASE_VERSION}"# $i;
done
echo "Applying to changes to linux binary builds"
for i in ".github/workflows/_binary-build-linux.yml" ".github/workflows/_binary-test-linux.yml"; do
sed -i "/github.event_name == 'pull_request'/d" $i;
sed -i -e s#main#"release/${RELEASE_VERSION}"# $i;
done
sed -i -e "/generate_ci_workflows.py/i \\\t\t\t\texport RELEASE_VERSION_TAG=${RELEASE_VERSION}" .github/workflows/lint.yml
# Triton wheel
echo "Triton Changes"
sed -i -e s#-\ main#"-\ release\/${RELEASE_VERSION}"# .github/workflows/build-triton-wheel.yml