Skip to content

Commit fda8ae8

Browse files
authored
[sdk generation pipeline] update command for changelog generation (#41688)
* update for tox run * update log
1 parent fe57ef1 commit fda8ae8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tools/azure-sdk-tools/packaging_tools/package_utils.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def create_package(prefolder, name, dest_folder=DEFAULT_DEST_FOLDER):
2929
@return_origin_path
3030
def change_log_new(package_folder: str, lastest_pypi_version: bool) -> str:
3131
os.chdir(package_folder)
32-
cmd = "tox run -c ../../../eng/tox/tox.ini --root . -e breaking -- --changelog "
32+
cmd = "python -m tox run -c ../../../eng/tox/tox.ini --root . -e breaking -- --changelog "
3333
if lastest_pypi_version:
3434
cmd += "--latest-pypi-version"
3535
try:
@@ -40,8 +40,11 @@ def change_log_new(package_folder: str, lastest_pypi_version: bool) -> str:
4040
raise e
4141
_LOGGER.info(f"Breaking change detector output: {output}")
4242
result = [l for l in output.split("\n")]
43-
begin = result.index("===== changelog start =====")
44-
end = result.index("===== changelog end =====")
43+
try:
44+
begin = result.index("===== changelog start =====")
45+
end = result.index("===== changelog end =====")
46+
except ValueError:
47+
raise Exception("\n".join(result))
4548
return "\n".join(result[begin + 1 : end]).strip()
4649

4750

0 commit comments

Comments
 (0)