Skip to content

Commit 8aeb035

Browse files
authored
Merge pull request #4294 from twz123/rm-binary-before-build
Remove binary before building it
2 parents 8c85b8f + ad98aac commit 8aeb035

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ k0s.exe: TARGET_OS = windows
189189
k0s.exe: BUILD_GO_CGO_ENABLED = 0
190190

191191
k0s.exe k0s: $(GO_SRCS) $(codegen_targets) go.sum
192+
rm -f -- '$@'
192193
CGO_ENABLED=$(BUILD_GO_CGO_ENABLED) CGO_CFLAGS='$(BUILD_CGO_CFLAGS)' GOOS=$(TARGET_OS) $(GO) build $(BUILD_GO_FLAGS) -ldflags='$(LD_FLAGS)' -o '$@' main.go
193194
ifneq ($(EMBEDDED_BINS_BUILDMODE),none)
194195
cat -- bindata_$(TARGET_OS) >>$@

0 commit comments

Comments
 (0)