I'd like to add a --version command line option to my python application that will show the right version depending on the tagged status of the command:
If the file comes from a version whose short hex ID was abcdef01 that was tagged TAG, --version should show this:
MyApp Version TAG (abcdef01)
If the file comes from the tip, --version should show this:
MyApp (tip)
If the file comes from an arbitrary, untagged revision abcdef02, --version should show this:
MyApp (development, abcdef02)
Is this possible? If so, how?
Once you activate the keyword extension, you can have it in a variable which can be carved up for the hash.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With