1
0
mirror of https://github.com/go-task/task.git synced 2025-08-10 22:42:19 +02:00

Add ROOT_DIR and TASKFILE_DIR special variables

Closes #215
This commit is contained in:
Andrey Nering
2022-09-03 18:14:54 -03:00
parent 1a0cc1d64d
commit f45dd11e53
9 changed files with 128 additions and 8 deletions

18
testdata/special_vars/Taskfile.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
version: '3'
includes:
included:
taskfile: ./included
dir: ./included
tasks:
default:
cmds:
- task: print
- task: included:print
print:
cmds:
- echo root/TASK={{.TASK}}
- echo root/ROOT_DIR={{.ROOT_DIR}}
- echo root/TASKFILE_DIR={{.TASKFILE_DIR}}

View File

@@ -0,0 +1,8 @@
version: '3'
tasks:
print:
cmds:
- echo included/TASK={{.TASK}}
- echo included/ROOT_DIR={{.ROOT_DIR}}
- echo included/TASKFILE_DIR={{.TASKFILE_DIR}}