I would like to add the -version command-line option to my python application that will show the correct version depending on the tagged status of the command:
If the file belongs to a version with a short hex identifier abcdef01that has been marked TAG, --versionshould show this:
MyApp Version TAG (abcdef01)
If the file was sent with a hint, it --versionshould show this:
MyApp (tip)
If the file belongs to an arbitrary, unlabeled version abcdef02, it --versionshould show this:
MyApp (development, abcdef02)
Is it possible? If so, how?
source
share