mirror of
https://github.com/go-task/task.git
synced 2025-08-10 22:42:19 +02:00
fix: run once in shared dependencies (#1655)
* fix: run once in shared dependencies * feat: add test
This commit is contained in:
11
testdata/run_once_shared_deps/Taskfile.yml
vendored
Normal file
11
testdata/run_once_shared_deps/Taskfile.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
version: '3'
|
||||
|
||||
includes:
|
||||
service-a: ./service-a
|
||||
service-b: ./service-b
|
||||
|
||||
tasks:
|
||||
build:
|
||||
deps:
|
||||
- service-a:build
|
||||
- service-b:build
|
9
testdata/run_once_shared_deps/library/Taskfile.yml
vendored
Normal file
9
testdata/run_once_shared_deps/library/Taskfile.yml
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
build:
|
||||
run: once
|
||||
cmds:
|
||||
- echo "build library"
|
||||
sources:
|
||||
- src/**/*
|
15
testdata/run_once_shared_deps/service-a/Taskfile.yml
vendored
Normal file
15
testdata/run_once_shared_deps/service-a/Taskfile.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
version: '3'
|
||||
|
||||
includes:
|
||||
library:
|
||||
taskfile: ../library/Taskfile.yml
|
||||
dir: ../library
|
||||
|
||||
tasks:
|
||||
build:
|
||||
run: once
|
||||
deps: [library:build]
|
||||
cmds:
|
||||
- echo "build a"
|
||||
sources:
|
||||
- src/**/*
|
1
testdata/run_once_shared_deps/service-a/src/imasource.go
vendored
Normal file
1
testdata/run_once_shared_deps/service-a/src/imasource.go
vendored
Normal file
@@ -0,0 +1 @@
|
||||
package main
|
15
testdata/run_once_shared_deps/service-b/Taskfile.yml
vendored
Normal file
15
testdata/run_once_shared_deps/service-b/Taskfile.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
version: '3'
|
||||
|
||||
includes:
|
||||
library:
|
||||
taskfile: ../library/Taskfile.yml
|
||||
dir: ../library
|
||||
|
||||
tasks:
|
||||
build:
|
||||
run: once
|
||||
deps: [library:build]
|
||||
cmds:
|
||||
- echo "build b"
|
||||
sources:
|
||||
- src/**/*
|
1
testdata/run_once_shared_deps/service-b/src/imasource.go
vendored
Normal file
1
testdata/run_once_shared_deps/service-b/src/imasource.go
vendored
Normal file
@@ -0,0 +1 @@
|
||||
package main
|
Reference in New Issue
Block a user