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

Add a version option to ots-cli command line #159

Closed
mshedsilegx opened this issue Dec 12, 2023 · 3 comments
Closed

Add a version option to ots-cli command line #159

mshedsilegx opened this issue Dec 12, 2023 · 3 comments
Assignees

Comments

@mshedsilegx
Copy link

mshedsilegx commented Dec 12, 2023

Can we please add a --version option to ots-cli, so it displays the version number; similar to what the ots server binary does.

@Luzifer Luzifer self-assigned this Dec 13, 2023
Luzifer added a commit that referenced this issue Dec 13, 2023
Signed-off-by: Knut Ahlers <knut@ahlers.me>
@Luzifer
Copy link
Owner

Luzifer commented Dec 13, 2023

Did not add an option but a sub-command which is the more used behavior for Cobra command binaries:

# ./ots-cli version
ots-cli dev

@mshedsilegx
Copy link
Author

Great. Shouldn't the CLI version match the main OTS binary, ie for example: 1.11.1-f2a7af3

@Luzifer
Copy link
Owner

Luzifer commented Dec 13, 2023

It will. The same version string will be baked in during release compile. dev is the fallback when no version is baked in (like when installing through go install or go build in a checkout). Have a look at the https://github.com/Luzifer/ots/blob/master/ci/build.sh#L20-L24 how the version is baked in.

@Luzifer Luzifer closed this as completed Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants