click-extra prebake version - Inject Git commit hash into
__version__.
click-extra prebake version [OPTIONS]
Inject Git commit hash into __version__.
Appends the Git short hash as a PEP 440 local version identifier
(e.g. 1.0.0.dev0 becomes 1.0.0.dev0+abc1234).
Only modifies .dev versions without an existing +
suffix. Release versions and already pre-baked versions are left
untouched.
- --hash
TEXT
- Git short hash to append. Auto-detected from HEAD if not provided.
- --module
PATH
- Path to __init__.py to modify. Auto-discovered from [project.scripts] if
not provided.
- --help /
-h
- Show this message and exit.
- VERSION_GIT_HASH
- Git short hash to append. Auto-detected from HEAD if not provided.
- VERSION_MODULE
- Path to __init__.py to modify. Auto-discovered from [project.scripts] if
not provided.
- VERSION_HELP
- Show this message and exit.
- 0
- Success.
- 1
- A runtime error, or an aborted prompt (Ctrl-C, a declined
confirmation).
- 2
- A usage error: unknown option, invalid value, missing operand, or an
unparsable configuration file.