mirror of
https://github.com/go-task/task.git
synced 2024-12-14 10:52:43 +02:00
45 lines
866 B
YAML
45 lines
866 B
YAML
version: '2'
|
|
|
|
tasks:
|
|
abs.txt:
|
|
desc: generates dest file based on absolute paths
|
|
deps:
|
|
- sub/src.txt
|
|
dir: sub
|
|
cmds:
|
|
- cat src.txt > '{{.BUILD_DIR}}/abs.txt'
|
|
sources:
|
|
- src.txt
|
|
generates:
|
|
- "{{.BUILD_DIR}}/abs.txt"
|
|
|
|
rel.txt:
|
|
desc: generates dest file based on relative paths
|
|
deps:
|
|
- sub/src.txt
|
|
dir: sub
|
|
cmds:
|
|
- cat src.txt > '../rel.txt'
|
|
sources:
|
|
- src.txt
|
|
generates:
|
|
- "../rel.txt"
|
|
|
|
sub/src.txt:
|
|
desc: generate source file
|
|
cmds:
|
|
- mkdir -p sub
|
|
- echo "hello world" > sub/src.txt
|
|
status:
|
|
- test -f sub/src.txt
|
|
|
|
'my text file.txt':
|
|
desc: generate file with spaces in the name
|
|
deps: [sub/src.txt]
|
|
cmds:
|
|
- cat sub/src.txt > 'my text file.txt'
|
|
sources:
|
|
- sub/src.txt
|
|
generates:
|
|
- 'my text file.txt'
|