Merge pull request #2772 from XiShanYongYe-Chang/fix-binary-complie-error

Fix random errors occur during binary compilation
This commit is contained in:
karmada-bot 2022-11-15 16:23:58 +08:00 committed by GitHub
commit e15755a291
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -1,6 +1,5 @@
GOOS ?= $(shell go env GOOS)
GOARCH ?= $(shell go env GOARCH)
SOURCES := $(shell find . -type f -name '*.go')
LDFLAGS='$(shell hack/version.sh)'
# Images management
@ -50,7 +49,7 @@ CMD_TARGET=$(TARGETS) $(CTL_TARGETS)
all: $(CMD_TARGET)
.PHONY: $(CMD_TARGET)
$(CMD_TARGET): $(SOURCES)
$(CMD_TARGET):
LDFLAGS=$(LDFLAGS) BUILD_PLATFORMS=$(GOOS)/$(GOARCH) hack/build.sh $@
# Build image.