mirror of
https://github.com/go-task/task.git
synced 2024-12-12 10:45:49 +02:00
26 lines
457 B
YAML
26 lines
457 B
YAML
version: '3'
|
|
|
|
silent: true
|
|
|
|
vars:
|
|
PREFIX: EXIT_CODE=
|
|
|
|
tasks:
|
|
exit-zero:
|
|
vars:
|
|
FOO: bar
|
|
DYNAMIC_FOO:
|
|
sh: echo 'bar'
|
|
cmds:
|
|
- defer: echo FOO={{.FOO}} - DYNAMIC_FOO={{.DYNAMIC_FOO}} - {{.PREFIX}}{{.EXIT_CODE}}
|
|
- exit 0
|
|
|
|
exit-one:
|
|
vars:
|
|
FOO: bar
|
|
DYNAMIC_FOO:
|
|
sh: echo 'bar'
|
|
cmds:
|
|
- defer: echo FOO={{.FOO}} - DYNAMIC_FOO={{.DYNAMIC_FOO}} - {{.PREFIX}}{{.EXIT_CODE}}
|
|
- exit 1
|