-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Before starting to hack around in the code individually, we should specify what we expect and how hooks should be configured and used in cooker.
I start with some questions:
Shall a hook be called pre-<cmd> and post-<cmd> where cmd is one of the low-level-commands of cooker (i.e.: init, update, generate, build)? Is this finely grained enough? Should we have local-conf-generate-pre/post-hook and bblayers.conf-generate-hook instead of a single generate-hook?
For commands which have items (layers/sources, builds) is the pre and post-hook called for each of them?
In what way do we configure a hook in the menu? Is there a special-section hooks or does each item has a pre-hook/post-hook? generate and init will be at global scope.
IMO, cooker would need a refactoring to include this kind of feature: splitting the file into classes, trying to integrate coverage-tests by using unit-tests (+ the existing functional tests).