feat: wildcard matching of task names

This commit is contained in:
Pete Davison
2024-01-27 15:51:43 +00:00
parent 1ef5cf71d0
commit 9a3d2bc3aa
3 changed files with 67 additions and 0 deletions

16
testdata/wildcards/Taskfile.yml vendored Normal file
View File

@@ -0,0 +1,16 @@
version: 3
tasks:
wildcard-*:
cmds:
- echo "Hello {{index .MATCH 0}}"
'*-wildcard-*':
cmds:
- echo "Hello {{index .MATCH 0}} {{index .MATCH 1}}"
start-*:
vars:
SERVICE: "{{index .MATCH 0}}"
cmds:
- echo "Starting {{.SERVICE}}"