Skip to content

Commit 21e78f6

Browse files
authored
sdk automation, fix changelog for mpg self-serve (Azure#44523)
* changelog for self-serve * always write changelog
1 parent ab7d65a commit 21e78f6

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

eng/automation/generate.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ def sdk_automation_typespec(config: dict) -> List[dict]:
244244

245245
def sdk_automation_typespec_project(tsp_project: str, config: dict) -> dict:
246246

247-
# TODO(xiaofei) support changelog, etc
248247
base_dir = os.path.abspath(os.path.dirname(sys.argv[0]))
249248
sdk_root = os.path.abspath(os.path.join(base_dir, SDK_ROOT))
250249
spec_root = os.path.abspath(config["specFolder"])
@@ -272,14 +271,27 @@ def sdk_automation_typespec_project(tsp_project: str, config: dict) -> dict:
272271
# compile
273272
succeeded = compile_arm_package(sdk_root, module)
274273
if succeeded:
274+
logging.info("[Changelog] Start breaking change detection for SDK automation.")
275275
breaking, changelog, breaking_change_items = compare_with_maven_package(
276276
sdk_root,
277277
GROUP_ID,
278278
service,
279279
get_latest_ga_version(GROUP_ID, module, stable_version),
280280
current_version,
281-
module,
281+
module
282282
)
283+
logging.info("[Changelog] Complete breaking change detection for SDK automation.")
284+
logging.info("[Changelog] Start generating changelog.")
285+
compare_with_maven_package(
286+
sdk_root,
287+
GROUP_ID,
288+
service,
289+
get_latest_release_version(stable_version, current_version),
290+
current_version,
291+
module
292+
)
293+
update_changelog_version(sdk_root, output_folder, current_version)
294+
logging.info("[Changelog] Complete generating changelog.")
283295

284296
# output
285297
if sdk_folder and module and service:

0 commit comments

Comments
 (0)