Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat :Add template flag to cyctl on module creation #456

Merged
merged 5 commits into from
Jul 21, 2024

Conversation

shivamrazorpay
Copy link
Contributor

@shivamrazorpay shivamrazorpay commented Jul 20, 2024

closes #

📑 Description

✅ Checks

  • I have updated the documentation as required
  • I have performed a self-review of my code

ℹ Additional context

@shivamrazorpay shivamrazorpay requested a review from a team as a code owner July 20, 2024 12:28
@shivamrazorpay shivamrazorpay changed the title Add template flag to cyctl on module creation Feat :Add template flag to cyctl on module creation - [Issue : #439] Jul 20, 2024
@shivamrazorpay shivamrazorpay changed the title Feat :Add template flag to cyctl on module creation - [Issue : #439] Feat :Add template flag to cyctl on module creation Jul 20, 2024
Copy link
Collaborator

@petar-cvit petar-cvit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one comment. Thanks @shivamrazorpay for the PR

Comment on lines 91 to 93
if (templateName != "" && (repo != "" || path != "")) || (templateName == "" && (repo == "" || path == "")) {
log.Fatalf("Error: Either template or (repo and path) must be provided.")
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add version here?

Suggested change
if (templateName != "" && (repo != "" || path != "")) || (templateName == "" && (repo == "" || path == "")) {
log.Fatalf("Error: Either template or (repo and path) must be provided.")
}
if (templateName != "" && (repo != "" || path != "" || version != "")) || (templateName == "" && (repo == "" || path == "")) {
log.Fatalf("Error: Either template or (repo, path and version) must be provided.")
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version was not a compulsory flag that is why I left it. I have added it now.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense @shivamrazorpay. This is just users dont use the --version flag to override the version in the template.
Can you push the update?

Copy link
Collaborator

@petar-cvit petar-cvit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @shivamrazorpay 🧡

@petar-cvit petar-cvit merged commit 5af8e75 into cyclops-ui:main Jul 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants