mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Apply release only changes to core (#109208)
Utility script to run after branch cut have been completed. Execute: ``RELEASE_VERSION=2.1 apply-release-changes.sh`` Similar to: https://github.com/pytorch/audio/pull/3590 Test PR: https://github.com/pytorch/pytorch/pull/109210 Automate generation of PRs: https://github.com/pytorch/pytorch/pull/108053 https://github.com/pytorch/pytorch/pull/108688 https://github.com/pytorch/pytorch/pull/108064 Pull Request resolved: https://github.com/pytorch/pytorch/pull/109208 Approved by: https://github.com/seemethere
This commit is contained in:
committed by
PyTorch MergeBot
parent
0c448526a4
commit
2322d989e8
47
scripts/release/apply-release-changes.sh
Executable file
47
scripts/release/apply-release-changes.sh
Executable file
@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Usage (run from root of project):
|
||||
# RELEASE_VERSION=2.1 apply-release-changes.sh
|
||||
#
|
||||
# RELEASE_VERSION: Version of this current release
|
||||
|
||||
set -eou pipefail
|
||||
|
||||
# Create and Check out to Release Branch
|
||||
# git checkout -b "${RELEASE_BRANCH}"
|
||||
|
||||
# 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;
|
||||
done
|
||||
# Change conda token for test env for conda upload
|
||||
sed -i 's#CONDA_PYTORCHBOT_TOKEN#CONDA_PYTORCHBOT_TOKEN_TEST#' .github/templates/upload.yml.j2
|
||||
|
||||
# Triton wheel
|
||||
echo "Triton Changes"
|
||||
sed -i -e s#-\ main#"-\ release\/${RELEASE_VERSION}"# .github/workflows/build-triton-wheel.yml
|
||||
|
||||
# XLA related changes
|
||||
echo "XLA Changes"
|
||||
sed -i -e s#--quiet#-b\ r"${RELEASE_VERSION}"# .ci/pytorch/common_utils.sh
|
||||
sed -i -e s#.*#r"${RELEASE_VERSION}"# .github/ci_commit_pins/xla.txt
|
||||
|
||||
# Binary tests
|
||||
echo "Binary tests"
|
||||
sed -i 's#/nightly/#/test/#' .circleci/scripts/binary_linux_test.sh
|
||||
sed -i 's#"\\${PYTORCH_CHANNEL}"#pytorch-test#' .circleci/scripts/binary_linux_test.sh
|
||||
|
||||
# Regenerated templates
|
||||
./.github/regenerate.sh
|
||||
|
||||
# Optional
|
||||
# git commit -m "[RELEASE-ONLY CHANGES] Branch Cut for Release {RELEASE_VERSION}"
|
||||
# git push origin "${RELEASE_BRANCH}"
|
Reference in New Issue
Block a user