Skip to content

Commit 97f3da3

Browse files
authored
Improve update_ci_for_release.sh (#1433)
1 parent 7e82740 commit 97f3da3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packaging/update_ci_for_release.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -euo pipefail
33

4-
VERSION="${1:?Usage: $0 <release-version> (e.g. 0.12)}"
4+
BRANCH="${1:?Usage: $0 <test-infra-release-branch> (e.g. release/2.12)}"
55

66
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
77
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
@@ -10,8 +10,8 @@ WORKFLOW_DIR="${REPO_ROOT}/.github/workflows"
1010
# 1. Update test-infra @main refs and test-infra-ref on ALL workflow files
1111
for f in "${WORKFLOW_DIR}"/*.yaml; do
1212
echo "Updating test-infra refs in $f ..."
13-
sed -i "s|pytorch/test-infra/\(.*\)@main|pytorch/test-infra/\1@release/${VERSION}|g" "$f"
14-
sed -i "s|test-infra-ref: main|test-infra-ref: release/${VERSION}|g" "$f"
13+
sed -i "s|pytorch/test-infra/\(.*\)@main|pytorch/test-infra/\1@${BRANCH}|g" "$f"
14+
sed -i "s|test-infra-ref: main|test-infra-ref: ${BRANCH}|g" "$f"
1515
done
1616

1717
# 2. Update python/ffmpeg/cuda versions in wheel install-and-test jobs only.
@@ -37,4 +37,4 @@ for f in "${WHEEL_FILES[@]}"; do
3737
sed -i "s|cuda-version: \[.*\]|cuda-version: ['12.6', '13.0', '13.2']|g" "$f"
3838
done
3939

40-
echo "Done! Updated workflow files for release/${VERSION}"
40+
echo "Done! Updated workflow files to point to test-infra branch '${BRANCH}'"

0 commit comments

Comments
 (0)