Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to configure golang flags #329

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ V = 0
Q = $(if $(filter 1,$V),,@)
TLS_SETTING := $(if $(filter $(OCI_BIN),podman),--tls-verify=false,)

# Go settings
GO_BUILD_OPTS ?= CGO_ENABLED=0 GO111MODULE=on
GO_TAGS ?= -tags no_openssl
GO_FLAGS ?= -mod vendor

all: lint build

GO := $(GOBIN)/go
Expand All @@ -45,7 +50,7 @@ lint: $(GO) $(GOLANGCI)
$(GOLANGCI) run

build-%: $(GO)
cd cmd/$* && $(GO) fmt && $(GO) vet && GOOS=linux GOARCH=$(GOARCH) CGO_ENABLED=0 GO111MODULE=on $(GO) build -tags no_openssl -mod vendor
cd cmd/$* && $(GO) fmt && $(GO) vet && GOOS=linux GOARCH=$(GOARCH) $(GO_BUILD_OPTS) $(GO) build $(GO_TAGS)

format: $(GO)
$(GO) fmt ./pkg/... ./cmd/...
Expand Down
Loading