mirror of
https://github.com/go-task/task.git
synced 2026-06-11 09:51:50 +00:00
feat: add option to declare an included Taskfile as flatten (#1704)
This commit is contained in:
1
testdata/includes_flatten/.gitignore
vendored
Normal file
1
testdata/includes_flatten/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.txt
|
||||
12
testdata/includes_flatten/Taskfile.multiple.yml
vendored
Normal file
12
testdata/includes_flatten/Taskfile.multiple.yml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
version: '3'
|
||||
|
||||
includes:
|
||||
included:
|
||||
taskfile: ./included
|
||||
flatten: true
|
||||
|
||||
tasks:
|
||||
gen:
|
||||
cmds:
|
||||
- echo "gen multiple"
|
||||
|
||||
13
testdata/includes_flatten/Taskfile.yml
vendored
Normal file
13
testdata/includes_flatten/Taskfile.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
version: '3'
|
||||
|
||||
includes:
|
||||
included:
|
||||
taskfile: ./included
|
||||
dir: ./included
|
||||
flatten: true
|
||||
|
||||
tasks:
|
||||
default:
|
||||
cmds:
|
||||
- echo root_directory > root_directory.txt
|
||||
|
||||
23
testdata/includes_flatten/included/Taskfile.yml
vendored
Normal file
23
testdata/includes_flatten/included/Taskfile.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
version: '3'
|
||||
|
||||
includes:
|
||||
nested:
|
||||
taskfile: ../nested
|
||||
flatten: true
|
||||
|
||||
tasks:
|
||||
gen:
|
||||
cmds:
|
||||
- echo "gen from included"
|
||||
|
||||
with_deps:
|
||||
deps:
|
||||
- gen
|
||||
cmds:
|
||||
- echo "with_deps from included"
|
||||
|
||||
|
||||
pwd:
|
||||
desc: Print working directory
|
||||
cmds:
|
||||
- pwd
|
||||
6
testdata/includes_flatten/nested/Taskfile.yml
vendored
Normal file
6
testdata/includes_flatten/nested/Taskfile.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
from_nested:
|
||||
cmds:
|
||||
- echo "from nested"
|
||||
Reference in New Issue
Block a user