From 73a99ebd92a5f804558530507f9f2d769ee56706 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sat, 2 Oct 2021 15:40:56 +0200 Subject: [PATCH] chore(mage): don't set api packages when they are not used --- magefile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magefile.go b/magefile.go index 7462c87ed1e..1924e278eeb 100644 --- a/magefile.go +++ b/magefile.go @@ -178,7 +178,6 @@ func initVars() { setVersion() setBinLocation() setPkgVersion() - setApiPackages() setGoFiles() Ldflags = `-X "` + PACKAGE + `/pkg/version.Version=` + VersionNumber + `" -X "main.Tags=` + Tags + `"` } @@ -348,6 +347,7 @@ type Test mg.Namespace // Runs all tests except integration tests func (Test) Unit() { mg.Deps(initVars) + setApiPackages() // We run everything sequentially and not in parallel to prevent issues with real test databases args := append([]string{"test", Goflags[0], "-p", "1", "-timeout", "20m"}, ApiPackages...) runAndStreamOutput("go", args...)