Extending Uplift with Hooks¶
Uplift can be extended through the use of hooks. A hook is a specific point during a workflow where Uplift executes adhoc shell commands and scripts. If you need to print the output from any command or script, use the --debug
flag.
before
: a hook that executes before any tasks within the workflowafter
: a hook that executes after completing all workflow tasksbeforeBump
: a hook that executes before bumping any configured filesafterBump
: a hook that executes after bumping all configured filesbeforeChangelog
: a hook that executes before generating a changelogafterChangelog
: a hook that executes after changelog generationbeforeTag
: a hook that executes before tagging the repositoryafterTag
: a hook that executes after the repository is tagged
- An example of invoking a script using a POSIX-based Windows shell. Pay special attention to the use of
//
when specifying a path
❤️ to the github.com/mvdan/sh library.
Injecting Environment Variables¶
Extend hook support by defining environment variables that Uplift will inject into the runtime environment. Either list environment variables individually or import them through dotenv (.env) files. Uplift will merge all environment variables with any pre-existing system ones.
❤️ to the github.com/joho/godotenv library.