Skip to content

Commit

Permalink
Remove binaries before rebuilding them
Browse files Browse the repository at this point in the history
  • Loading branch information
pwittrock committed Oct 13, 2017
1 parent f5c76ed commit f972d17
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/apiserver-boot/boot/build/build_executables.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ func BazelBuild(cmd *cobra.Command, args []string) {
log.Fatal(err)
}

os.RemoveAll(filepath.Join("bin", "apiserver"))
os.RemoveAll(filepath.Join("bin", "controller-manager"))

c = exec.Command("cp",
filepath.Join("bazel-bin", "cmd", "apiserver", "apiserver"),
filepath.Join("bin", "apiserver"))
Expand Down Expand Up @@ -137,6 +140,9 @@ func GoBuild(cmd *cobra.Command, args []string) {
RunGenerate(cmd, args)
}

os.RemoveAll(filepath.Join("bin", "apiserver"))
os.RemoveAll(filepath.Join("bin", "controller-manager"))

// Build the apiserver
path := filepath.Join("cmd", "apiserver", "main.go")
c := exec.Command("go", "build", "-o", filepath.Join(outputdir, "apiserver"), path)
Expand Down

0 comments on commit f972d17

Please sign in to comment.