Skip to content
Snippets Groups Projects
Commit dbb38fac authored by Valentin Rothberg's avatar Valentin Rothberg
Browse files

go build: use -mod=vendor when available


This will prevent go from using modules while building which would break
package builds.

Signed-off-by: default avatarValentin Rothberg <rothberg@redhat.com>
parent bca7253d
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,11 @@ GOPKGBASEDIR ?= $(shell dirname "$(GOPKGDIR)")
SELINUXOPT ?= $(shell test -x /usr/sbin/selinuxenabled && selinuxenabled && echo -Z)
GO_BUILD=$(GO) build
# Go module support: set `-mod=vendor` to use the vendored sources
ifeq ($(shell go help mod >/dev/null 2>&1 && echo true), true)
GO_BUILD=GO111MODULE=on $(GO) build -mod=vendor
endif
GOBIN := $(shell $(GO) env GOBIN)
ifeq ($(GOBIN),)
GOBIN := $(FIRST_GOPATH)/bin
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment