mirror of
https://github.com/labring/sealos.git
synced 2026-09-24 15:46:19 +08:00
ci: Update ci.yml to use simpler make build to build testing binaries (#1278)
* ci: Update ci.yml to use simpler make build to build testing binaries Signed-off-by: Mercurio <signormercurio@gmail.com> * fix GOARCH bug in Makefile Signed-off-by: Mercurio <signormercurio@gmail.com> * attempt to remove some of the dependencies Signed-off-by: Mercurio <signormercurio@gmail.com> * sync makefile and goreleaser build flags Signed-off-by: Mercurio <signormercurio@gmail.com>
This commit is contained in:
@@ -40,12 +40,12 @@ endif
|
||||
|
||||
# only support linux
|
||||
GOOS=linux
|
||||
|
||||
# set a specific GOARCH
|
||||
ifeq ($(origin GOARCH), undefined)
|
||||
GOARCH := $(shell go env GOARCH)
|
||||
endif
|
||||
# set a specific PLATFORM
|
||||
ifeq ($(origin PLATFORM), undefined)
|
||||
ifeq ($(origin GOARCH), undefined)
|
||||
GOARCH := $(shell go env GOARCH)
|
||||
endif
|
||||
PLATFORM := $(GOOS)_$(GOARCH)
|
||||
endif
|
||||
|
||||
|
||||
@@ -15,12 +15,13 @@
|
||||
GO := go
|
||||
GO_LDFLAGS += -X $(VERSION_PACKAGE).gitVersion=${GIT_TAG} \
|
||||
-X $(VERSION_PACKAGE).gitCommit=${GIT_COMMIT} \
|
||||
-X $(VERSION_PACKAGE).buildDate=${BUILD_DATE}
|
||||
-X $(VERSION_PACKAGE).buildDate=${BUILD_DATE} \
|
||||
-s -w
|
||||
ifeq ($(DEBUG), 1)
|
||||
GO_BUILD_FLAGS += -gcflags "all=-N -l"
|
||||
GO_LDFLAGS=
|
||||
endif
|
||||
GO_BUILD_FLAGS += -tags "containers_image_openpgp netgo exclude_graphdriver_devicemapper static osusergo exclude_graphdriver_btrfs" -ldflags "$(GO_LDFLAGS)"
|
||||
GO_BUILD_FLAGS += -tags "containers_image_openpgp netgo exclude_graphdriver_devicemapper static osusergo exclude_graphdriver_btrfs" -trimpath -ldflags "$(GO_LDFLAGS)"
|
||||
|
||||
ifeq ($(ROOT_PACKAGE),)
|
||||
$(error the variable ROOT_PACKAGE must be set prior to including golang.mk)
|
||||
|
||||
Reference in New Issue
Block a user