mirror of
https://github.com/go-task/task.git
synced 2025-02-07 13:41:53 +02:00
Fixes issue #48 by considering a task up-to-date if the newest file from sources and the oldest file from generates has exactly the same time-stamp.
32 lines
562 B
YAML
32 lines
562 B
YAML
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
|