Clarification of execution order for pre,main,post workflows #1188
Open
Description
As I understand from sources, comments and issues, if I wanted to replace a pre,main,post workflow through a simple placeholder script, I would need to set WIREIT_PARALLEL=1 and have each scripting dependency declare the previous step as a dependency?
Concrete example:
{
...
"scripts": {
...
"predb:update": "pnpm run db:pull",
"db:update": "pnpm run db:generate",
"postdb:update": "pnpm run db:post-processing"
...
}
...
}
By themselves I could migrate them and I think the appropriate way to convert those would look something like this. But it feels a little bit counter-intuitive?
{
...
"wireit": {
"db:update:step1": {
"command": "db:pull"
},
"db:update:step2": {
"dependencies": [
"db:update:step1"
],
"command": "db:generate"
},
"db:update:step3": {
"dependencies": [
"db:update:step2"
],
"command": "db:dump"
},
"db:update": {
"dependencies": [
"db:update:step1",
"db:update:step2",
"db:update:step3"
]
}
}
...
}
Is there a better/preferred way to build "meta" scripts like this? Or would a simple entry with just the linked tasks as dependencies work and would they be executed in the correct order based on WIREIT_PARALLEL=1?
Thanks!
EDITED optimized example workflow
Metadata
Assignees
Labels
No labels