mirror of
https://github.com/go-task/task.git
synced 2025-06-23 00:38:19 +02:00
feat: variable inheritance tests (#2038)
This commit is contained in:
11
testdata/var_inheritance/v3/entrypoint-global-dotenv/Taskfile.yml
vendored
Normal file
11
testdata/var_inheritance/v3/entrypoint-global-dotenv/Taskfile.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
dotenv:
|
||||
- 'global.env'
|
||||
|
||||
tasks:
|
||||
default:
|
||||
cmds:
|
||||
- 'echo "{{.VAR}}"'
|
||||
- 'echo "$ENV"'
|
2
testdata/var_inheritance/v3/entrypoint-global-dotenv/global.env
vendored
Normal file
2
testdata/var_inheritance/v3/entrypoint-global-dotenv/global.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=entrypoint-global-dotenv
|
||||
ENV=entrypoint-global-dotenv
|
15
testdata/var_inheritance/v3/entrypoint-global-vars/Taskfile.yml
vendored
Normal file
15
testdata/var_inheritance/v3/entrypoint-global-vars/Taskfile.yml
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
dotenv:
|
||||
- 'global.env'
|
||||
vars:
|
||||
VAR: entrypoint-global-vars
|
||||
env:
|
||||
ENV: entrypoint-global-vars
|
||||
|
||||
tasks:
|
||||
default:
|
||||
cmds:
|
||||
- 'echo "{{.VAR}}"'
|
||||
- 'echo "$ENV"'
|
2
testdata/var_inheritance/v3/entrypoint-global-vars/global.env
vendored
Normal file
2
testdata/var_inheritance/v3/entrypoint-global-vars/global.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=entrypoint-global-dotenv
|
||||
ENV=entrypoint-global-dotenv
|
25
testdata/var_inheritance/v3/entrypoint-task-call-dotenv/Taskfile.yml
vendored
Normal file
25
testdata/var_inheritance/v3/entrypoint-task-call-dotenv/Taskfile.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
dotenv:
|
||||
- 'global.env'
|
||||
vars:
|
||||
VAR: entrypoint-global-vars
|
||||
env:
|
||||
ENV: entrypoint-global-vars
|
||||
|
||||
tasks:
|
||||
default:
|
||||
dotenv:
|
||||
- 'task.env'
|
||||
cmds:
|
||||
- task: called-task
|
||||
vars:
|
||||
VAR: entrypoint-task-call-vars
|
||||
|
||||
called-task:
|
||||
dotenv:
|
||||
- 'called-task.env'
|
||||
cmds:
|
||||
- 'echo "{{.VAR}}"'
|
||||
- 'echo "$ENV"'
|
2
testdata/var_inheritance/v3/entrypoint-task-call-dotenv/called-task.env
vendored
Normal file
2
testdata/var_inheritance/v3/entrypoint-task-call-dotenv/called-task.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=entrypoint-task-call-dotenv
|
||||
ENV=entrypoint-task-call-dotenv
|
2
testdata/var_inheritance/v3/entrypoint-task-call-dotenv/global.env
vendored
Normal file
2
testdata/var_inheritance/v3/entrypoint-task-call-dotenv/global.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=entrypoint-global-dotenv
|
||||
ENV=entrypoint-global-dotenv
|
2
testdata/var_inheritance/v3/entrypoint-task-call-dotenv/task.env
vendored
Normal file
2
testdata/var_inheritance/v3/entrypoint-task-call-dotenv/task.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=entrypoint-task-dotenv
|
||||
ENV=entrypoint-task-dotenv
|
27
testdata/var_inheritance/v3/entrypoint-task-call-task-vars/Taskfile.yml
vendored
Normal file
27
testdata/var_inheritance/v3/entrypoint-task-call-task-vars/Taskfile.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
dotenv:
|
||||
- 'global.env'
|
||||
vars:
|
||||
VAR: entrypoint-global-vars
|
||||
env:
|
||||
ENV: entrypoint-global-vars
|
||||
|
||||
tasks:
|
||||
default:
|
||||
dotenv:
|
||||
- 'task.env'
|
||||
cmds:
|
||||
- task: called-task
|
||||
vars:
|
||||
VAR: entrypoint-task-call-vars
|
||||
|
||||
called-task:
|
||||
vars:
|
||||
VAR: entrypoint-task-call-task-vars
|
||||
env:
|
||||
ENV: entrypoint-task-call-task-vars
|
||||
cmds:
|
||||
- 'echo "{{.VAR}}"'
|
||||
- 'echo "$ENV"'
|
2
testdata/var_inheritance/v3/entrypoint-task-call-task-vars/global.env
vendored
Normal file
2
testdata/var_inheritance/v3/entrypoint-task-call-task-vars/global.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=entrypoint-global-dotenv
|
||||
ENV=entrypoint-global-dotenv
|
2
testdata/var_inheritance/v3/entrypoint-task-call-task-vars/task.env
vendored
Normal file
2
testdata/var_inheritance/v3/entrypoint-task-call-task-vars/task.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=entrypoint-task-dotenv
|
||||
ENV=entrypoint-task-dotenv
|
23
testdata/var_inheritance/v3/entrypoint-task-call-vars/Taskfile.yml
vendored
Normal file
23
testdata/var_inheritance/v3/entrypoint-task-call-vars/Taskfile.yml
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
dotenv:
|
||||
- 'global.env'
|
||||
vars:
|
||||
VAR: entrypoint-global-vars
|
||||
env:
|
||||
ENV: entrypoint-global-vars
|
||||
|
||||
tasks:
|
||||
default:
|
||||
dotenv:
|
||||
- 'task.env'
|
||||
cmds:
|
||||
- task: called-task
|
||||
vars:
|
||||
VAR: entrypoint-task-call-vars
|
||||
|
||||
called-task:
|
||||
cmds:
|
||||
- 'echo "{{.VAR}}"'
|
||||
- 'echo "$ENV"'
|
2
testdata/var_inheritance/v3/entrypoint-task-call-vars/global.env
vendored
Normal file
2
testdata/var_inheritance/v3/entrypoint-task-call-vars/global.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=entrypoint-global-dotenv
|
||||
ENV=entrypoint-global-dotenv
|
2
testdata/var_inheritance/v3/entrypoint-task-call-vars/task.env
vendored
Normal file
2
testdata/var_inheritance/v3/entrypoint-task-call-vars/task.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=entrypoint-task-dotenv
|
||||
ENV=entrypoint-task-dotenv
|
17
testdata/var_inheritance/v3/entrypoint-task-dotenv/Taskfile.yml
vendored
Normal file
17
testdata/var_inheritance/v3/entrypoint-task-dotenv/Taskfile.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
dotenv:
|
||||
- 'global.env'
|
||||
vars:
|
||||
VAR: entrypoint-global-vars
|
||||
env:
|
||||
ENV: entrypoint-global-vars
|
||||
|
||||
tasks:
|
||||
default:
|
||||
dotenv:
|
||||
- 'task.env'
|
||||
cmds:
|
||||
- 'echo "{{.VAR}}"'
|
||||
- 'echo "$ENV"'
|
2
testdata/var_inheritance/v3/entrypoint-task-dotenv/global.env
vendored
Normal file
2
testdata/var_inheritance/v3/entrypoint-task-dotenv/global.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=entrypoint-global-dotenv
|
||||
ENV=entrypoint-global-dotenv
|
2
testdata/var_inheritance/v3/entrypoint-task-dotenv/task.env
vendored
Normal file
2
testdata/var_inheritance/v3/entrypoint-task-dotenv/task.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=entrypoint-task-dotenv
|
||||
ENV=entrypoint-task-dotenv
|
21
testdata/var_inheritance/v3/entrypoint-task-vars/Taskfile.yml
vendored
Normal file
21
testdata/var_inheritance/v3/entrypoint-task-vars/Taskfile.yml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
dotenv:
|
||||
- 'global.env'
|
||||
vars:
|
||||
VAR: entrypoint-global-vars
|
||||
env:
|
||||
ENV: entrypoint-global-vars
|
||||
|
||||
tasks:
|
||||
default:
|
||||
dotenv:
|
||||
- 'task.env'
|
||||
vars:
|
||||
VAR: entrypoint-task-vars
|
||||
env:
|
||||
ENV: entrypoint-task-vars
|
||||
cmds:
|
||||
- 'echo "{{.VAR}}"'
|
||||
- 'echo "$ENV"'
|
2
testdata/var_inheritance/v3/entrypoint-task-vars/global.env
vendored
Normal file
2
testdata/var_inheritance/v3/entrypoint-task-vars/global.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=entrypoint-global-dotenv
|
||||
ENV=entrypoint-global-dotenv
|
2
testdata/var_inheritance/v3/entrypoint-task-vars/task.env
vendored
Normal file
2
testdata/var_inheritance/v3/entrypoint-task-vars/task.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=entrypoint-task-dotenv
|
||||
ENV=entrypoint-task-dotenv
|
12
testdata/var_inheritance/v3/included-global-vars/Taskfile.yml
vendored
Normal file
12
testdata/var_inheritance/v3/included-global-vars/Taskfile.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
dotenv:
|
||||
- 'global.env'
|
||||
vars:
|
||||
VAR: entrypoint-global-vars
|
||||
env:
|
||||
ENV: entrypoint-global-vars
|
||||
|
||||
includes:
|
||||
included: included.yml
|
2
testdata/var_inheritance/v3/included-global-vars/global.env
vendored
Normal file
2
testdata/var_inheritance/v3/included-global-vars/global.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=entrypoint-global-dotenv
|
||||
ENV=entrypoint-global-dotenv
|
13
testdata/var_inheritance/v3/included-global-vars/included.yml
vendored
Normal file
13
testdata/var_inheritance/v3/included-global-vars/included.yml
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
vars:
|
||||
VAR: included-global-vars
|
||||
env:
|
||||
ENV: included-global-vars
|
||||
|
||||
tasks:
|
||||
default:
|
||||
cmds:
|
||||
- 'echo "{{.VAR}}"'
|
||||
- 'echo "$ENV"'
|
12
testdata/var_inheritance/v3/included-task-call-dotenv/Taskfile.yml
vendored
Normal file
12
testdata/var_inheritance/v3/included-task-call-dotenv/Taskfile.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
dotenv:
|
||||
- 'global.env'
|
||||
vars:
|
||||
VAR: entrypoint-global-vars
|
||||
env:
|
||||
ENV: entrypoint-global-vars
|
||||
|
||||
includes:
|
||||
included: included.yml
|
2
testdata/var_inheritance/v3/included-task-call-dotenv/global.env
vendored
Normal file
2
testdata/var_inheritance/v3/included-task-call-dotenv/global.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=entrypoint-global-dotenv
|
||||
ENV=entrypoint-global-dotenv
|
21
testdata/var_inheritance/v3/included-task-call-dotenv/included.yml
vendored
Normal file
21
testdata/var_inheritance/v3/included-task-call-dotenv/included.yml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
vars:
|
||||
VAR: included-global-vars
|
||||
env:
|
||||
ENV: included-global-vars
|
||||
|
||||
tasks:
|
||||
default:
|
||||
dotenv:
|
||||
- 'task.env'
|
||||
cmds:
|
||||
- task: called-task
|
||||
vars:
|
||||
VAR: included-task-call-vars
|
||||
|
||||
called-task:
|
||||
cmds:
|
||||
- 'echo "{{.VAR}}"'
|
||||
- 'echo "$ENV"'
|
2
testdata/var_inheritance/v3/included-task-call-dotenv/task.env
vendored
Normal file
2
testdata/var_inheritance/v3/included-task-call-dotenv/task.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=included-task-dotenv
|
||||
ENV=included-task-dotenv
|
12
testdata/var_inheritance/v3/included-task-call-task-vars/Taskfile.yml
vendored
Normal file
12
testdata/var_inheritance/v3/included-task-call-task-vars/Taskfile.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
dotenv:
|
||||
- 'global.env'
|
||||
vars:
|
||||
VAR: entrypoint-global-vars
|
||||
env:
|
||||
ENV: entrypoint-global-vars
|
||||
|
||||
includes:
|
||||
included: included.yml
|
2
testdata/var_inheritance/v3/included-task-call-task-vars/global.env
vendored
Normal file
2
testdata/var_inheritance/v3/included-task-call-task-vars/global.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=entrypoint-global-dotenv
|
||||
ENV=entrypoint-global-dotenv
|
25
testdata/var_inheritance/v3/included-task-call-task-vars/included.yml
vendored
Normal file
25
testdata/var_inheritance/v3/included-task-call-task-vars/included.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
vars:
|
||||
VAR: included-global-vars
|
||||
env:
|
||||
ENV: included-global-vars
|
||||
|
||||
tasks:
|
||||
default:
|
||||
dotenv:
|
||||
- 'task.env'
|
||||
cmds:
|
||||
- task: called-task
|
||||
vars:
|
||||
VAR: included-task-call-vars
|
||||
|
||||
called-task:
|
||||
vars:
|
||||
VAR: included-task-call-task-vars
|
||||
env:
|
||||
ENV: included-task-call-task-vars
|
||||
cmds:
|
||||
- 'echo "{{.VAR}}"'
|
||||
- 'echo "$ENV"'
|
2
testdata/var_inheritance/v3/included-task-call-task-vars/task.env
vendored
Normal file
2
testdata/var_inheritance/v3/included-task-call-task-vars/task.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=included-task-dotenv
|
||||
ENV=included-task-dotenv
|
12
testdata/var_inheritance/v3/included-task-call-vars/Taskfile.yml
vendored
Normal file
12
testdata/var_inheritance/v3/included-task-call-vars/Taskfile.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
dotenv:
|
||||
- 'global.env'
|
||||
vars:
|
||||
VAR: entrypoint-global-vars
|
||||
env:
|
||||
ENV: entrypoint-global-vars
|
||||
|
||||
includes:
|
||||
included: included.yml
|
2
testdata/var_inheritance/v3/included-task-call-vars/global.env
vendored
Normal file
2
testdata/var_inheritance/v3/included-task-call-vars/global.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=entrypoint-global-dotenv
|
||||
ENV=entrypoint-global-dotenv
|
21
testdata/var_inheritance/v3/included-task-call-vars/included.yml
vendored
Normal file
21
testdata/var_inheritance/v3/included-task-call-vars/included.yml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
vars:
|
||||
VAR: included-global-vars
|
||||
env:
|
||||
ENV: included-global-vars
|
||||
|
||||
tasks:
|
||||
default:
|
||||
dotenv:
|
||||
- 'task.env'
|
||||
cmds:
|
||||
- task: called-task
|
||||
vars:
|
||||
VAR: included-task-call-vars
|
||||
|
||||
called-task:
|
||||
cmds:
|
||||
- 'echo "{{.VAR}}"'
|
||||
- 'echo "$ENV"'
|
2
testdata/var_inheritance/v3/included-task-call-vars/task.env
vendored
Normal file
2
testdata/var_inheritance/v3/included-task-call-vars/task.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=included-task-dotenv
|
||||
ENV=included-task-dotenv
|
12
testdata/var_inheritance/v3/included-task-dotenv/Taskfile.yml
vendored
Normal file
12
testdata/var_inheritance/v3/included-task-dotenv/Taskfile.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
dotenv:
|
||||
- 'global.env'
|
||||
vars:
|
||||
VAR: entrypoint-global-vars
|
||||
env:
|
||||
ENV: entrypoint-global-vars
|
||||
|
||||
includes:
|
||||
included: included.yml
|
2
testdata/var_inheritance/v3/included-task-dotenv/global.env
vendored
Normal file
2
testdata/var_inheritance/v3/included-task-dotenv/global.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=entrypoint-global-dotenv
|
||||
ENV=entrypoint-global-dotenv
|
15
testdata/var_inheritance/v3/included-task-dotenv/included.yml
vendored
Normal file
15
testdata/var_inheritance/v3/included-task-dotenv/included.yml
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
vars:
|
||||
VAR: included-global-vars
|
||||
env:
|
||||
ENV: included-global-vars
|
||||
|
||||
tasks:
|
||||
default:
|
||||
dotenv:
|
||||
- 'task.env'
|
||||
cmds:
|
||||
- 'echo "{{.VAR}}"'
|
||||
- 'echo "$ENV"'
|
2
testdata/var_inheritance/v3/included-task-dotenv/task.env
vendored
Normal file
2
testdata/var_inheritance/v3/included-task-dotenv/task.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=included-task-dotenv
|
||||
ENV=included-task-dotenv
|
12
testdata/var_inheritance/v3/included-task-vars/Taskfile.yml
vendored
Normal file
12
testdata/var_inheritance/v3/included-task-vars/Taskfile.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
dotenv:
|
||||
- 'global.env'
|
||||
vars:
|
||||
VAR: entrypoint-global-vars
|
||||
env:
|
||||
ENV: entrypoint-global-vars
|
||||
|
||||
includes:
|
||||
included: included.yml
|
2
testdata/var_inheritance/v3/included-task-vars/global.env
vendored
Normal file
2
testdata/var_inheritance/v3/included-task-vars/global.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=entrypoint-global-dotenv
|
||||
ENV=entrypoint-global-dotenv
|
19
testdata/var_inheritance/v3/included-task-vars/included.yml
vendored
Normal file
19
testdata/var_inheritance/v3/included-task-vars/included.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
vars:
|
||||
VAR: included-global-vars
|
||||
env:
|
||||
ENV: included-global-vars
|
||||
|
||||
tasks:
|
||||
default:
|
||||
dotenv:
|
||||
- 'task.env'
|
||||
vars:
|
||||
VAR: included-task-vars
|
||||
env:
|
||||
ENV: included-task-vars
|
||||
cmds:
|
||||
- 'echo "{{.VAR}}"'
|
||||
- 'echo "$ENV"'
|
2
testdata/var_inheritance/v3/included-task-vars/task.env
vendored
Normal file
2
testdata/var_inheritance/v3/included-task-vars/task.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=included-task-dotenv
|
||||
ENV=included-task-dotenv
|
12
testdata/var_inheritance/v3/included-task/Taskfile.yml
vendored
Normal file
12
testdata/var_inheritance/v3/included-task/Taskfile.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
dotenv:
|
||||
- 'global.env'
|
||||
vars:
|
||||
VAR: entrypoint-global-vars
|
||||
env:
|
||||
ENV: entrypoint-global-vars
|
||||
|
||||
includes:
|
||||
included: included.yml
|
2
testdata/var_inheritance/v3/included-task/global.env
vendored
Normal file
2
testdata/var_inheritance/v3/included-task/global.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=entrypoint-global-dotenv
|
||||
ENV=entrypoint-global-dotenv
|
15
testdata/var_inheritance/v3/included-task/included.yml
vendored
Normal file
15
testdata/var_inheritance/v3/included-task/included.yml
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
vars:
|
||||
VAR: included-global-vars
|
||||
env:
|
||||
ENV: included-global-vars
|
||||
|
||||
tasks:
|
||||
default:
|
||||
dotenv:
|
||||
- 'task.env'
|
||||
cmds:
|
||||
- 'echo "{{.VAR}}"'
|
||||
- 'echo "$ENV"'
|
2
testdata/var_inheritance/v3/included-task/task.env
vendored
Normal file
2
testdata/var_inheritance/v3/included-task/task.env
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VAR=included-task-dotenv
|
||||
ENV=included-task-dotenv
|
9
testdata/var_inheritance/v3/shell/Taskfile.yml
vendored
Normal file
9
testdata/var_inheritance/v3/shell/Taskfile.yml
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
|
||||
tasks:
|
||||
default:
|
||||
cmds:
|
||||
- 'echo "{{.VAR}}"'
|
||||
- 'echo "$ENV"'
|
Reference in New Issue
Block a user