2020-05-16 20:45:41 +02:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
vars:
|
2021-01-09 17:09:23 +02:00
|
|
|
BUILD_DIR:
|
|
|
|
sh: pwd
|
2017-07-12 11:30:28 +02:00
|
|
|
|
2019-08-18 17:37:21 +02:00
|
|
|
tasks:
|
2021-01-09 17:09:23 +02:00
|
|
|
abs.txt:
|
2019-08-18 17:37:21 +02:00
|
|
|
desc: generates dest file based on absolute paths
|
|
|
|
deps:
|
|
|
|
- sub/src.txt
|
|
|
|
dir: sub
|
|
|
|
cmds:
|
|
|
|
- cat src.txt > '{{.BUILD_DIR}}/abs.txt'
|
2019-09-09 03:51:56 +02:00
|
|
|
method: timestamp
|
2019-08-18 17:37:21 +02:00
|
|
|
sources:
|
|
|
|
- src.txt
|
|
|
|
generates:
|
|
|
|
- "{{.BUILD_DIR}}/abs.txt"
|
2017-07-12 11:30:28 +02:00
|
|
|
|
2019-08-18 17:37:21 +02:00
|
|
|
rel.txt:
|
|
|
|
desc: generates dest file based on relative paths
|
|
|
|
deps:
|
|
|
|
- sub/src.txt
|
|
|
|
dir: sub
|
|
|
|
cmds:
|
|
|
|
- cat src.txt > '../rel.txt'
|
2019-09-09 03:51:56 +02:00
|
|
|
method: timestamp
|
2019-08-18 17:37:21 +02:00
|
|
|
sources:
|
|
|
|
- src.txt
|
|
|
|
generates:
|
|
|
|
- "../rel.txt"
|
2019-02-22 01:52:27 +02:00
|
|
|
|
2019-08-18 17:37:21 +02:00
|
|
|
sub/src.txt:
|
|
|
|
desc: generate source file
|
|
|
|
cmds:
|
|
|
|
- mkdir -p sub
|
|
|
|
- echo "hello world" > sub/src.txt
|
2019-09-09 03:51:56 +02:00
|
|
|
method: timestamp
|
2019-08-18 17:37:21 +02:00
|
|
|
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'
|
2019-09-09 03:51:56 +02:00
|
|
|
method: timestamp
|
2019-08-18 17:37:21 +02:00
|
|
|
sources:
|
|
|
|
- sub/src.txt
|
|
|
|
generates:
|
|
|
|
- 'my text file.txt'
|