File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed
Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ #
3+ # Usage (run from root of project):
4+ # RELEASE_VERSION=2.1 apply-release-changes.sh
5+ #
6+ # RELEASE_VERSION: Version of this current release
7+
8+ set -eou pipefail
9+
10+ # Create and Check out to Release Branch
11+ # git checkout -b "${RELEASE_BRANCH}"
12+
13+ # Change all GitHub Actions to reference the test-infra release branch
14+ # as opposed to main.
15+ echo " Applying to workflows"
16+ for i in .github/workflows/* .yml; do
17+ sed -i -e s#@main#@" release/${RELEASE_VERSION} " # $i;
18+ done
19+
20+ # Change all checkout step in templates to not add ref to checkout
21+ echo " Applying to templates"
22+ for i in .github/templates/* .yml.j2; do
23+ sed -i ' s#common.checkout(\(.*\))#common.checkout(\1, checkout_pr_head=False)#' $i ;
24+ done
25+ # Change conda token for test env for conda upload
26+ sed -i ' s#CONDA_PYTORCHBOT_TOKEN#CONDA_PYTORCHBOT_TOKEN_TEST#' .github/templates/upload.yml.j2
27+
28+ # Triton wheel
29+ echo " Triton Changes"
30+ sed -i -e s#-\ main#" -\ release\/${RELEASE_VERSION} " # .github/workflows/build-triton-wheel.yml
31+
32+ # XLA related changes
33+ echo " XLA Changes"
34+ sed -i -e s#--quiet#-b\ r" ${RELEASE_VERSION} " # .ci/pytorch/common_utils.sh
35+ sed -i -e s#.* # r"${RELEASE_VERSION}"# .github/ci_commit_pins/xla.txt
36+
37+ # Binary tests
38+ echo " Binary tests"
39+ sed -i ' s#/nightly/#/test/#' .circleci/scripts/binary_linux_test.sh
40+ sed -i ' s#"\\${PYTORCH_CHANNEL}"#pytorch-test#' .circleci/scripts/binary_linux_test.sh
41+
42+ # Regenerated templates
43+ ./.github/regenerate.sh
44+
45+ # Optional
46+ # git commit -m "[RELEASE-ONLY CHANGES] Branch Cut for Release {RELEASE_VERSION}"
47+ # git push origin "${RELEASE_BRANCH}"
You can’t perform that action at this time.
0 commit comments