groundwork icon indicating copy to clipboard operation
groundwork copied to clipboard

gw recipe: pre and post functions

Open danwos opened this issue 5 years ago • 1 comments

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".

danwos avatar Apr 16 '19 05:04 danwos

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.

danwos avatar Apr 16 '19 06:04 danwos