2020-05-16 20:45:41 +02:00
|
|
|
version: '3'
|
2019-01-02 16:05:40 +02:00
|
|
|
|
|
|
|
vars:
|
|
|
|
BAZ:
|
|
|
|
sh: echo baz
|
|
|
|
|
|
|
|
env:
|
|
|
|
FOO: foo
|
|
|
|
BAR: bar
|
|
|
|
BAZ: "{{.BAZ}}"
|
2024-07-17 00:44:34 +02:00
|
|
|
QUX: from_taskfile
|
2019-01-02 16:05:40 +02:00
|
|
|
|
|
|
|
tasks:
|
|
|
|
default:
|
|
|
|
cmds:
|
|
|
|
- task: local
|
|
|
|
- task: global
|
2024-07-17 00:44:34 +02:00
|
|
|
- task: not-overriden
|
2024-05-09 16:14:38 +02:00
|
|
|
- task: multiple_type
|
2019-01-02 16:05:40 +02:00
|
|
|
|
|
|
|
local:
|
|
|
|
vars:
|
|
|
|
AMD64: amd64
|
|
|
|
env:
|
|
|
|
GOOS: linux
|
|
|
|
GOARCH: "{{.AMD64}}"
|
|
|
|
CGO_ENABLED:
|
|
|
|
sh: echo '0'
|
|
|
|
cmds:
|
|
|
|
- echo "GOOS='$GOOS' GOARCH='$GOARCH' CGO_ENABLED='$CGO_ENABLED'" > local.txt
|
|
|
|
|
|
|
|
global:
|
|
|
|
env:
|
|
|
|
BAR: overriden
|
|
|
|
cmds:
|
|
|
|
- echo "FOO='$FOO' BAR='$BAR' BAZ='$BAZ'" > global.txt
|
2024-05-09 16:14:38 +02:00
|
|
|
|
|
|
|
multiple_type:
|
|
|
|
env:
|
|
|
|
FOO: 1
|
|
|
|
BAR: true
|
|
|
|
BAZ: 1.1
|
|
|
|
cmds:
|
|
|
|
- echo "FOO='$FOO' BAR='$BAR' BAZ='$BAZ'" > multiple_type.txt
|
2024-07-17 00:44:34 +02:00
|
|
|
|
|
|
|
not-overriden:
|
|
|
|
cmds:
|
|
|
|
- echo "QUX='$QUX'" > not-overriden.txt
|
|
|
|
|
|
|
|
overriden:
|
|
|
|
cmds:
|
|
|
|
- echo "QUX='$QUX'" > overriden.txt
|