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 version flag to the executable #61

Closed
jkhoogland opened this issue Nov 27, 2024 · 4 comments
Closed

Add version flag to the executable #61

jkhoogland opened this issue Nov 27, 2024 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers packaging Supporting new platforms, packaging, installation.

Comments

@jkhoogland
Copy link

Hi,
it would be great if there was a --version flag available.
Is it possible to add this?
Thanks!

@lawmurray lawmurray added enhancement New feature or request packaging Supporting new platforms, packaging, installation. good first issue Good for newcomers labels Nov 28, 2024
@lawmurray
Copy link
Owner

lawmurray commented Nov 28, 2024

Thanks for the suggestion @jkhoogland, should be straightforward enough.

If anyone (including yourself) has bandwidth to add this before I do, the ideal approach would be to get the version as defined in the CMakeLists.txt file and define a macro for it (if CMake does not automatically define such a macro, I know GNU Autotools does, never done this with CMake though). The macro could then be used for the output of the program when --version is given.

The CircleCI packaging pipeline already updates the version number in CMakeLists.txt when packaging, so it should be set there already. The release tarballs on GitHub are snapshots of a tag, however, and have the version number hardcoded to 0.0.0. So will need to do something about that too. Maybe a manual update of that when releasing will be necessary, but I prefer to automate these things if possible.

@jkhoogland
Copy link
Author

Added a PR: #64

@jkhoogland
Copy link
Author

Updated with minimal logic for use of system yaml if available: 2521c0c

@lawmurray
Copy link
Owner

Closing now as resolved by the merge of #64. Thanks to @jkhoogland again for the addition!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers packaging Supporting new platforms, packaging, installation.
Projects
None yet
Development

No branches or pull requests

2 participants