ArmyCyberInstitute / cmgr

CTF Challenge Manager
Apache License 2.0
18 stars 9 forks source link

Command line flag to display version #20

Closed h00die closed 3 years ago

h00die commented 3 years ago

cmgr currently does not have a way to display what version it is. This would be a handy addition for debugging issues between challenge developers who may not all be running the same version. I would suggest a --version or -V to print a banner as the first line of output, while still running commands.

jrolli commented 3 years ago

Thanks for the suggestion. I just created a new release that implements function similar to what you suggested. Specifically, cmgr version and cmgrd --version will print the version and exit. If you want it to log the version while performing other functionality, then you can set the logging level to info (CMGR_LOGGING=info) and it will be the first item logged.

Note: Version information relies on injecting the git information at build time and will default to unknown unless built properly. See the release action for how that is done.