Skip to content

Commit f7b78da

Browse files
marco-satalman
andauthored
Rename release_matrix.json to releases.json (#1882)
Prevent deletion of matrix JSON file during workflow clean up of other JSON files Co-authored-by: Andrey Talman <[email protected]>
1 parent 400056f commit f7b78da

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.github/workflows/update-quick-start-module.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ jobs:
105105
uses: peter-evans/create-pull-request@v3
106106
with:
107107
token: ${{ secrets.PYTORCHBOT_TOKEN }}
108-
commit-message: Modify published_versions.json, release_matrix.json and quick-start-module.js
109-
title: '[Getting Started Page] Modify published_versions.json, release_matrix.json and quick-start-module.js'
108+
commit-message: Modify published_versions.json, releases.json and quick-start-module.js
109+
title: '[Getting Started Page] Modify published_versions.json, releases.json and quick-start-module.js'
110110
body: >
111111
This PR is auto-generated. It updates Getting Started page
112112
labels: automated pr
File renamed without changes.

scripts/gen_quick_start_module.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ def write_published_versions(versions):
8383
with open(BASE_DIR / "published_versions.json", "w") as outfile:
8484
json.dump(versions, outfile, indent=2)
8585

86-
# Create release matrix for PyTorch website.
87-
# It's utilized to populate config data for
86+
# Create releases JSON for PyTorch website.
87+
# Matrix is being used to populate config data for
8888
# the "Start Locally" installation options table.
89-
def write_release_matrix(matrix):
90-
with open(BASE_DIR / "release_matrix.json", "w") as outfile:
89+
def write_releases_file(matrix):
90+
with open(BASE_DIR / "releases.json", "w") as outfile:
9191
json.dump(matrix, outfile, indent=2)
9292

9393
def read_matrix_for_os(osys: OperatingSystem, channel: str):
@@ -248,7 +248,7 @@ def main():
248248
for osys in OperatingSystem:
249249
release_matrix[val][osys.value] = read_matrix_for_os(osys, val)
250250

251-
write_release_matrix(release_matrix)
251+
write_releases_file(release_matrix)
252252

253253
extract_arch_ver_map(release_matrix)
254254
for val in ("nightly", "release"):

0 commit comments

Comments
 (0)