Go/Task: Difference between revisions

From Fundamental Ramen
< Go
Jump to navigation Jump to search
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])
   B(Run preconditions sequentially)
 
   C1(Run precondition 1)
   D([Run deps in parallel])
   C2(Run precondition 2)
   E1([Run 1st dependency])
   Cn(Run precondition n)
   E2([Run 2nd dependency])
   D(Run deps in parallel)
   En([Run nth dependency])
   E1(Run 1st dependency)
   F([All dependencies succeeded?])
   E2(Run 2nd dependency)
 
   En(Run nth dependency)
   B([Run preconditions sequentially])
   F(All dependencies finished)
   C1([Run precondition 1])
   G(Run cmds)
   C2([Run precondition 2])
   H1(Run 1st command<br>in dedicate shell)
   Cn([Run precondition n])
   H2(Run 2nd command<br>in dedicate shell)
 
   Hn(Run nth command<br>in dedicate shell)
   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


  A --> B
   B --> C1
   B --> C1
   C1 -- successfully --> C2
 
   C1 -- failed --> Z2
   C1 -->|Succeeded| C2
   C2 -- successfully --> Cn
   C1 -->|Failed| Z2
   C2 -- failed --> Z2
 
   Cn -- successfully --> D
   C2 -->|Succeeded| Cn
   Cn -- failed --> Z2
   C2 -->|Failed| Z2
  D --> E1 & E2 & En
 
  E1 & E2 & En --> F
   Cn -->|Succeeded| G
  F --> G
   Cn -->|Failed| Z2
  F -- one or more of dependencies failed --> Z2
 
   G --> H1
   G --> H1
   H1 --> H2
 
   H1 -- failed --> Z2
   H1 -->|Succeeded| H2
   H2 --> Hn
   H1 -->|Failed| Z2
   H2 -- failed --> Z2
 
   Hn --> Z1
   H2 -->|Succeeded| Hn
   Hn -- failed --> Z2
   H2 -->|Failed| Z2
 
   Hn -->|Succeeded| Z1
   Hn -->|Failed| Z2
</quickmmd>
</quickmmd>

Latest revision as of 04:06, 29 September 2026

Comparison for cmds, deps & preconditions

cmds deps preconditions
Parallel ❌ ✅ ❌
Refer another task ✅ ✅ ❌
Error message ❌ ❌ ✅
stdout visible ✅ ✅ ❌

Task Flow