Skip to content

Commit 3289fc0

Browse files
[Internal] Sync automated tagging files. (#920)
NO_CHANGELOG=true ## What changes are proposed in this pull request? Sync automated tagging files. This include a bug fix where the config for version value location was being loaded from the wrong file. ## How is this tested? N/A Co-authored-by: Renaud Hartert <[email protected]>
1 parent a0ef9c5 commit 3289fc0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tagging.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
NEXT_CHANGELOG_FILE_NAME = "NEXT_CHANGELOG.md"
1515
CHANGELOG_FILE_NAME = "CHANGELOG.md"
1616
PACKAGE_FILE_NAME = ".package.json"
17+
CODEGEN_FILE_NAME = ".codegen.json"
1718
"""
1819
This script tags the release of the SDKs using a combination of the GitHub API and Git commands.
1920
It reads the local repository to determine necessary changes, updates changelogs, and creates tags.
@@ -153,14 +154,14 @@ def update_version_references(tag_info: TagInfo) -> None:
153154
Code references are defined in .package.json files.
154155
"""
155156

156-
# Load version patterns from '.package.json' file
157-
package_file_path = os.path.join(os.getcwd(), tag_info.package.path, PACKAGE_FILE_NAME)
157+
# Load version patterns from '.codegen.json' file at the top level of the repository
158+
package_file_path = os.path.join(os.getcwd(), CODEGEN_FILE_NAME)
158159
with open(package_file_path, 'r') as file:
159160
package_file = json.load(file)
160161

161162
version = package_file.get('version')
162163
if not version:
163-
print(f"Version not found in .package.json. Nothing to update.")
164+
print(f"`version` not found in .codegen.json. Nothing to update.")
164165
return
165166

166167
# Update the versions

0 commit comments

Comments
 (0)