mirror of
https://github.com/go-task/task.git
synced 2025-08-10 22:42:19 +02:00
Only run task once for #53
This commit is contained in:
committed by
Andrey Nering
parent
a7b59e5b12
commit
97c85e39c3
1
testdata/run/.gitignore
vendored
Normal file
1
testdata/run/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.txt
|
24
testdata/run/Taskfile.yml
vendored
Normal file
24
testdata/run/Taskfile.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
version: '3'
|
||||
run: when_changed
|
||||
|
||||
tasks:
|
||||
generate-hash:
|
||||
- rm -f hash.txt
|
||||
- task: input-content
|
||||
vars: { CONTENT: '1' }
|
||||
- task: input-content
|
||||
vars: { CONTENT: '2' }
|
||||
- task: input-content
|
||||
vars: { CONTENT: '2' }
|
||||
|
||||
input-content:
|
||||
deps:
|
||||
- task: create-output
|
||||
vars: { CONTENT: '1' }
|
||||
cmds:
|
||||
- echo {{.CONTENT}} >> hash.txt
|
||||
|
||||
create-output:
|
||||
run: once
|
||||
cmds:
|
||||
- echo starting {{.CONTENT}} >> hash.txt
|
Reference in New Issue
Block a user