Skip to main content

Module exec

Module exec 

Source
Expand description

External command execution hooks (similar to the semantic-release exec plugin).

Exposes computed version variables as GitVersion_* environment variables and {Variable}/{env:VAR} template tokens, then runs lifecycle hook commands. The version hook can modify the version by writing to stdout (which overwrites next-version and triggers a recalculation).

Constants§

HOOK_ORDER
Execution order for side-effect hooks.

Functions§

run_hooks
Run side-effect hooks (verify/prepare/publish/success) in order. On failure, runs the fail hook if present and then propagates the error. extra_prepare is the temporary prepare command supplied via --exec (run after the config’s prepare).
run_version_hook
Run the version hook (or --exec-version). Returns the first non-empty line from stdout. The caller applies the result as next-version and recalculates.