From ba493710f91ba9bec4ecc2d8c4eb3850939ed541 Mon Sep 17 00:00:00 2001 From: Phillip Wittrock Date: Thu, 12 Oct 2017 12:10:38 -0700 Subject: [PATCH] Run gazelle after generating code --- cmd/apiserver-boot/boot/build/build_executables.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/apiserver-boot/boot/build/build_executables.go b/cmd/apiserver-boot/boot/build/build_executables.go index 0d9e508eeb..52b2281bae 100644 --- a/cmd/apiserver-boot/boot/build/build_executables.go +++ b/cmd/apiserver-boot/boot/build/build_executables.go @@ -80,6 +80,11 @@ func RunBuildExecutables(cmd *cobra.Command, args []string) { } func BazelBuild(cmd *cobra.Command, args []string) { + if GenerateForBuild { + log.Printf("regenerating generated code. To disable regeneration, run with --generate=false.") + RunGenerate(cmd, args) + } + if Gazelle { c := exec.Command("gazelle", "update", "-go_prefix", util.Repo, "-external", "vendored", "pkg", "cmd") @@ -92,11 +97,6 @@ func BazelBuild(cmd *cobra.Command, args []string) { } } - if GenerateForBuild { - log.Printf("regenerating generated code. To disable regeneration, run with --generate=false.") - RunGenerate(cmd, args) - } - c := exec.Command("bazel", "build", filepath.Join("cmd", "apiserver"), filepath.Join("cmd", "controller-manager"))