Go/Task: Difference between revisions
< Go
No edit summary |
|||
| (6 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
https://taskfile.dev/docs/guide | * https://taskfile.dev/docs/guide | ||
* https://taskfile.dev/docs/guide#using-programmatic-checks-to-cancel-the-execution-of-a-task-and-its-dependencies | |||
== Comparison for cmds, deps & preconditions == | == Comparison for cmds, deps & preconditions == | ||
{| class="wikitable" | {| class="wikitable" style="text-align:center;" | ||
! || cmds || deps || preconditions | ! || cmds || deps || preconditions | ||
|- | |- | ||
| Parallel || || || | | Parallel || ❌ || ✅ || ❌ | ||
|- | |- | ||
| Refer another task || || || | | Refer another task || ✅ || ✅ || ❌ | ||
|- | |||
| Error message || ❌ || ❌ || ✅ | |||
|- | |||
| stdout visible || ✅ || ✅ || ❌ | |||
|} | |} | ||
| Line 15: | Line 20: | ||
<quickmmd name="go-task-flow"> | <quickmmd name="go-task-flow"> | ||
flowchart TD | flowchart TD | ||
A(Run task) | A([Run task]) | ||
D([Run deps in parallel]) | |||
E1([Run 1st dependency]) | |||
E2([Run 2nd dependency]) | |||
En([Run nth dependency]) | |||
F([All dependencies succeeded?]) | |||
B([Run preconditions sequentially]) | |||
C1([Run precondition 1]) | |||
G(Run cmds) | C2([Run precondition 2]) | ||
H1(Run 1st command | Cn([Run precondition n]) | ||
H2(Run 2nd command | |||
Hn(Run nth command | G([Run cmds sequentially]) | ||
Z1(Done) | H1([Run 1st command in a dedicated shell]) | ||
Z2(Leave task) | H2([Run 2nd command in a dedicated shell]) | ||
Hn([Run nth command in a dedicated shell]) | |||
Z1([Done]) | |||
Z2([Leave task with error]) | |||
A --> D | |||
D --> E1 | |||
D --> E2 | |||
D --> En | |||
E1 --> F | |||
E2 --> F | |||
En --> F | |||
F -->|No| Z2 | |||
F -->|Yes| B | |||
B --> C1 | B --> C1 | ||
C1 | |||
C1 | C1 -->|Succeeded| C2 | ||
C2 | C1 -->|Failed| Z2 | ||
C2 | |||
Cn | C2 -->|Succeeded| Cn | ||
Cn | C2 -->|Failed| Z2 | ||
Cn -->|Succeeded| G | |||
Cn -->|Failed| Z2 | |||
G --> H1 | G --> H1 | ||
H1 --> H2 | |||
H1 | H1 -->|Succeeded| H2 | ||
H2 --> Hn | H1 -->|Failed| Z2 | ||
H2 | |||
Hn --> Z1 | H2 -->|Succeeded| Hn | ||
Hn | H2 -->|Failed| Z2 | ||
Hn -->|Succeeded| Z1 | |||
Hn -->|Failed| Z2 | |||
</quickmmd> | </quickmmd> | ||
Latest revision as of 04:06, 29 September 2026
- https://taskfile.dev/docs/guide
- https://taskfile.dev/docs/guide#using-programmatic-checks-to-cancel-the-execution-of-a-task-and-its-dependencies
Comparison for cmds, deps & preconditions
| cmds | deps | preconditions | |
|---|---|---|---|
| Parallel | ❌ | ✅ | ❌ |
| Refer another task | ✅ | ✅ | ❌ |
| Error message | ❌ | ❌ | ✅ |
| stdout visible | ✅ | ✅ | ❌ |
Task Flow