1
0
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:
Ross Hammermeister
2020-08-17 13:25:17 -06:00
committed by Andrey Nering
parent a7b59e5b12
commit 97c85e39c3
12 changed files with 173 additions and 0 deletions

1
testdata/run/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*.txt

24
testdata/run/Taskfile.yml vendored Normal file
View 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