Skip to content

Commit

Permalink
Fix swagger pipeline folder name in ci yaml (Azure#29686)
Browse files Browse the repository at this point in the history
* update

* udpate
  • Loading branch information
msyyc authored Mar 31, 2023
1 parent 794a672 commit 02362da
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions tools/azure-sdk-tools/packaging_tools/generate_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,18 @@ def init_new_service(package_name, folder_name, is_typespec = False):
f"python -m packaging_tools --build-conf {package_name} -o {folder_name}",
shell=True,
)
ci = Path(folder_name, "ci.yml")
if not ci.exists():
with open("ci_template.yml", "r") as file_in:
content = file_in.readlines()
name = package_name.replace("azure-", "").replace("mgmt-", "")
content = [line.replace("MyService", name) for line in content]
with open(str(ci), "w") as file_out:
file_out.writelines(content)
else:
output_path = Path(folder_name) / package_name
if not (output_path / "sdk_packaging.toml").exists():
with open(output_path / "sdk_packaging.toml", "w") as file_out:
file_out.write("[packaging]\nauto_update = false")

# add ci.yaml
generate_ci(
template_path=Path("scripts/quickstart_tooling_dpg/template_ci"),
folder_path=Path(folder_name),
package_name=package_name
)
# add ci.yaml
generate_ci(
template_path=Path("scripts/quickstart_tooling_dpg/template_ci"),
folder_path=Path(folder_name),
package_name=package_name
)


def update_servicemetadata(sdk_folder, data, config, folder_name, package_name, spec_folder, input_readme):
Expand Down

0 comments on commit 02362da

Please sign in to comment.