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/59 cmd implement version flag #62

Merged

Conversation

deepu9
Copy link
Contributor

@deepu9 deepu9 commented Jul 5, 2024

Closes #59

Cobra Command struct comes with Version field. Once the version field is set, we have a version(-v or --version) flag. See attached screenshot.
vib_version_flag

Set version field of the cobra command
@deepu9 deepu9 marked this pull request as ready for review July 5, 2024 02:25
@mirkobrombin mirkobrombin merged commit 69852ce into Vanilla-OS:main Jul 5, 2024
2 checks passed
Copy link
Member

@kbdharun kbdharun left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution, while this implementation is fine this introduces inconsistency between main.go (which is outdated) and this one, so I would suggest fixing the version in the main.go and then updating this to get the version from there.

@deepu9
Copy link
Contributor Author

deepu9 commented Jul 5, 2024

Thanks for your contribution, while this implementation is fine this introduces inconsistency between main.go (which is outdated) and this one, so I would suggest fixing the version in the main.go and then updating this to get the version from there.

You mean like the one in Ikaros package.
https://github.com/Vanilla-OS/Ikaros/blob/main/cmd/root.go

https://github.com/Vanilla-OS/Ikaros/blob/main/main.go

I'll create a new PR for it. I'll also update sub-command options.

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.

Feature Request: implement version flag
4 participants