Skip to content

Commit 66ba51f

Browse files
committed
build: Dynamically find all go modules in project
1 parent 9ff5444 commit 66ba51f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

twoliter/embedded/Makefile.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ BUILDSYS_JOBS = "8"
9797
CARGO_HOME = "${BUILDSYS_ROOT_DIR}/.cargo"
9898
# This needs to end with pkg/mod so that we can mount the parent of pkg/mod as GOPATH.
9999
GO_MOD_CACHE = "${BUILDSYS_ROOT_DIR}/.gomodcache/pkg/mod"
100-
GO_MODULES = "ecs-gpu-init host-ctr"
100+
# Dynamically load a list of go modules from ${BUILDSYS_SOURCE_DIR}
101+
GO_MODULES = { script = ['find ${BUILDSYS_SOURCES_DIR} -name go.mod -type f -printf "%h\n" | xargs -n1 basename'] }
101102
DOCKER_BUILDKIT = "1"
102103

103104
# This is the filename suffix for operations that write out AMI information to

0 commit comments

Comments
 (0)