diff --git a/integration_test.go b/integration_test.go index 453257a1..85357b10 100644 --- a/integration_test.go +++ b/integration_test.go @@ -367,8 +367,8 @@ func downloadArchive(check func(error), dstPath, srcURL, skipPrefix, wantSHA256 func mustHandleFlags(t *testing.T) { if *regenerate { t.Run("Generate", func(t *testing.T) { - fmt.Print(mustRunCommand(t, "go", "run", "-tags", "protolegacy", "./internal/cmd/generate-types", "-execute")) - fmt.Print(mustRunCommand(t, "go", "run", "-tags", "protolegacy", "./internal/cmd/generate-protos", "-execute")) + fmt.Print(mustRunCommand(t, "go", "generate", "./internal/cmd/generate-types")) + fmt.Print(mustRunCommand(t, "go", "generate", "./internal/cmd/generate-protos")) files := strings.Split(strings.TrimSpace(mustRunCommand(t, "git", "ls-files", "*.go")), "\n") mustRunCommand(t, append([]string{"gofmt", "-w"}, files...)...) }) diff --git a/internal/cmd/generate-protos/main.go b/internal/cmd/generate-protos/main.go index c52843f9..861aa72b 100644 --- a/internal/cmd/generate-protos/main.go +++ b/internal/cmd/generate-protos/main.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:generate go run . -execute +//go:generate go run -tags protolegacy . -execute package main diff --git a/internal/cmd/generate-types/main.go b/internal/cmd/generate-types/main.go index c525067c..53f3721b 100644 --- a/internal/cmd/generate-types/main.go +++ b/internal/cmd/generate-types/main.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:generate go run . -execute +//go:generate go run -tags protolegacy . -execute package main