Skip to content

Commit

Permalink
Update create_component.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cobycloud authored Dec 18, 2024
1 parent 2412aa3 commit 27ea918
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/create_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ def main():
if not all(key in placeholders for key in ["package_scope", "resource_kind", "package_name"]):
raise ValueError("Missing required placeholders: package_scope, resource_kind, package_name")

dynamic_output_path = Path(args.output) / placeholders["package_scope"] / placeholders["resource_kind"] / placeholders["package_name"]
if placeholders["resource_kind"].endswith("s") != 's':
placeholders["resource_kind"] = f"{placeholders["resource_kind"]}s"
dynamic_output_path = Path(args.output) / placeholders["package_scope"].lower() / placeholders["resource_kind"].lower() / placeholders["package_name"]

# Generate the project
create_component(args.template, dynamic_output_path, placeholders)
Expand Down

0 comments on commit 27ea918

Please sign in to comment.