task
parent
d30a6abd50
commit
89a79ba18c
@ -0,0 +1,9 @@
|
||||
version: '3'
|
||||
tasks:
|
||||
hello:
|
||||
cmds:
|
||||
- echo "I am going to write a file named 'output.txt' now."
|
||||
- echo "hello" > output.txt
|
||||
generates:
|
||||
- output.txt
|
||||
|
||||
@ -0,0 +1 @@
|
||||
hello
|
||||
@ -0,0 +1,16 @@
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
main-task:
|
||||
cmds:
|
||||
- task: task-to-be-called
|
||||
- task: another-task
|
||||
- echo "Both done"
|
||||
|
||||
task-to-be-called:
|
||||
cmds:
|
||||
- echo "Task to be called"
|
||||
|
||||
another-task:
|
||||
cmds:
|
||||
- echo "Another task"
|
||||
@ -0,0 +1,15 @@
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
|
||||
build:
|
||||
deps: [assets]
|
||||
cmds:
|
||||
- echo "exécution de la tâche 'build'"
|
||||
- echo "hello" > test2.txt
|
||||
|
||||
assets:
|
||||
cmds:
|
||||
- echo "exécution de la tâche 'assets'"
|
||||
- echo "hello" > test1.txt
|
||||
|
||||
@ -0,0 +1 @@
|
||||
hello
|
||||
@ -0,0 +1 @@
|
||||
hello
|
||||
@ -0,0 +1,22 @@
|
||||
apt install taskfile
|
||||
ou bien
|
||||
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin
|
||||
pour l'installer "facilement"
|
||||
|
||||
- créer des task dépendantes les unes des autres
|
||||
|
||||
exemple :
|
||||
|
||||
la tâche "build" dépend de la tâche "assets"
|
||||
|
||||
|
||||
(des tâches bidon)
|
||||
echo "hello" > test1.txt
|
||||
|
||||
|
||||
- autre demande
|
||||
|
||||
faire une taĉhe qui en appelle une autre
|
||||
une tâche qui dépend d'une autre tâche (c'est-à-dire que si on lance cette tâche, le builder va lancer la tâche dépendante avant)
|
||||
|
||||
une tâche qui appelle une autre tâche (c'est-à-dire que la tâche lance une autre tâche après)
|
||||
Loading…
Reference in New Issue