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

make: consistently use $(GO) to invoke the Go tool #10181

Merged
merged 1 commit into from Feb 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile.defs
Expand Up @@ -29,7 +29,7 @@ ifneq ($(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/.git),)
else
GIT_VERSION = $(shell cat $(ROOT_DIR)/GIT_VERSION)
endif
BUILD = $(VERSION) $(GIT_VERSION) $(shell go version)
BUILD = $(VERSION) $(GIT_VERSION) $(shell $(GO) version)
GOLDFLAGS = -X "github.com/cilium/cilium/pkg/version.Version=$(BUILD)"

CILIUM_ENVOY_SHA=$(shell grep -o "FROM.*cilium/cilium-envoy:[0-9a-fA-F]*" $(ROOT_DIR)/Dockerfile | cut -d : -f 2)
Expand All @@ -51,9 +51,9 @@ ifeq ($(GO111MODULE),on)
GOCLEAN ?= -mod=vendor
endif
# Compile with '-mod=vendor' if go >= 1.13
GO_MAJOR_VERSION_GE_1 := $(shell expr `go version | grep -E 'go[0-9]{1}+' -o | sed 's/go//g'` \>= 1)
GO_MAJOR_VERSION_GE_1 := $(shell expr `$(GO) version | grep -E 'go[0-9]{1}+' -o | sed 's/go//g'` \>= 1)
ifeq ($(GO_MAJOR_VERSION_GE_1),1)
GO_MINOR_VERSION_GE_13 := $(shell expr `go version | grep -E 'go[^ ]+' -o | sed 's/go1.//g'` \>= 13)
GO_MINOR_VERSION_GE_13 := $(shell expr `$(GO) version | grep -E 'go[^ ]+' -o | sed 's/go1.//g'` \>= 13)
ifeq ($(GO_MINOR_VERSION_GE_13),1)
GOFLAGS ?= -mod=vendor
GOCLEAN ?= -mod=vendor
Expand Down