1
0
mirror of https://github.com/go-task/task.git synced 2025-11-23 22:24:45 +02:00

fix: adjust run: when_changed to work correctly with imported tasks (#2511)

This commit is contained in:
Timothy Rule
2025-11-22 21:17:13 +01:00
committed by GitHub
parent 799bc85498
commit 386dcbc1a0
7 changed files with 82 additions and 5 deletions

11
testdata/run_when_changed/Taskfile.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
version: '3'
includes:
service-a: ./service-a
service-b: ./service-b
tasks:
start:
cmds:
- task: service-a:start
- task: service-b:start

View File

@@ -0,0 +1,7 @@
version: '3'
tasks:
login:
run: when_changed
cmds:
- echo "login server={{.SERVER}} user={{.USER}}"

View File

@@ -0,0 +1,18 @@
version: '3'
includes:
library:
taskfile: ../library/Taskfile.yml
dir: ../library
tasks:
start:
cmds:
- task: library:login
vars:
SERVER: fubar
USER: fubar
- task: library:login
vars:
SERVER: foo
USER: foo

View File

@@ -0,0 +1,18 @@
version: '3'
includes:
library:
taskfile: ../library/Taskfile.yml
dir: ../library
tasks:
start:
cmds:
- task: library:login
vars:
SERVER: fubar
USER: fubar
- task: library:login
vars:
SERVER: bar
USER: bar