groundwork
groundwork copied to clipboard
gw recipe: pre and post functions
During the registration of a recipe, the developer shall be able to register pre- and post-functions for the recipe build. These functions get executed, if a build for the recipe gets executed.
use cases for pre-functions:
- Check if installation folder is ready
- Prepare installation folder (e.g. set permissions)
use cases for post functions:
- Check if everything got installed correctly
- Set permissions
- Add additional files
Build gets only interpreted as success, if pre and post functions have been executed without throwing an exception or returning "False".
Have a look at https://cookiecutter.readthedocs.io/en/latest/advanced/hooks.html
Maybe these mechanism can be used to invoke the pre/post functions.