Support pre/post hooks for tasks #7
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
There should be a way to define pre/post hooks for tasks. For example:
There should also be global pre/post hooks, like this:
However, tasks are run in the background so the GLOBAL.post task needs to agree with specific task on a mechanism to signal when they're done (such as a lockfile)
TODO: investigate if #6 (run-parts style ordering of tasks) would not cover all the needs here. This could prove to be a simpler mechanism.
We can probably use ordered task to achieve pre/post hooks for individual tasks.
However maybe global pre-post hooks can still be useful. Potential usecases:
So i think simple lock files from tasks would do the trick :
The global post-hook can be a simple task that runs late in the game (
99-homepage
).To build my homepage containing the different links to my different draft websites, i should wait for all task that symbolic link to
zola
to finish their thing, then append the link to target destination folder