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

Use cobra's version flag support #1229

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

skitt
Copy link
Member

@skitt skitt commented Sep 20, 2024

Assigning a value to the Version field in the root cobra command automatically defines a --version flag which displays the command name and version, in much the same way as "subctl version" does already. This provides version information in a fashion aligned with common practice.

Assigning a value to the Version field in the root cobra command
automatically defines a --version flag which displays the command name
and version, in much the same way as "subctl version" does already.
This provides version information in a fashion aligned with common
practice.

Signed-off-by: Stephen Kitt <[email protected]>
@submariner-bot
Copy link
Contributor

🤖 Created branch: z_pr1229/skitt/cobra-version-flag
🚀 Full E2E won't run until the "ready-to-test" label is applied. I will add it automatically once the PR has 2 approvals, or you can add it manually.

@tpantelis
Copy link
Contributor

Should we remove our version command?

@submariner-bot submariner-bot added the ready-to-test When a PR is ready for full E2E testing label Sep 23, 2024
@vthapar
Copy link
Contributor

vthapar commented Sep 23, 2024

Should we remove our version command?

There might be automated scripts using it. We should deprecate it before removing it.

@tpantelis tpantelis merged commit 33ee906 into submariner-io:devel Sep 24, 2024
33 checks passed
@submariner-bot
Copy link
Contributor

🤖 Closed branches: [z_pr1229/skitt/cobra-version-flag]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-test When a PR is ready for full E2E testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants