@@ -14,10 +14,8 @@ BUILDAH := buildah
14
14
GO := go
15
15
GO_LDFLAGS := $(shell if $(GO ) version|grep -q gccgo; then echo "-gccgoflags"; else echo "-ldflags"; fi)
16
16
GO_GCFLAGS := $(shell if $(GO ) version|grep -q gccgo; then echo "-gccgoflags"; else echo "-gcflags"; fi)
17
- GO110 := 1.10
18
- GOVERSION := $(findstring $(GO110 ) ,$(shell go version) )
19
17
# test for go module support
20
- ifeq ($(shell go help mod >/dev/null 2>&1 && echo true) , true)
18
+ ifeq ($(shell $( GO ) help mod >/dev/null 2>&1 && echo true) , true)
21
19
export GO_BUILD=GO111MODULE =on $(GO ) build -mod=vendor
22
20
export GO_TEST=GO111MODULE =on $(GO ) test -mod=vendor
23
21
else
@@ -31,9 +29,12 @@ GIT_COMMIT ?= $(if $(shell git status --porcelain --untracked-files=no),${COMMIT
31
29
SOURCE_DATE_EPOCH ?= $(if $(shell date +% s) ,$(shell date +% s) ,$(error "date failed") )
32
30
STATIC_STORAGETAGS = "containers_image_openpgp exclude_graphdriver_devicemapper $(STORAGE_TAGS ) "
33
31
34
- CNI_COMMIT := $(shell sed -n 's;\tgithub.com/containernetworking/cni \([^ \n]* \) .*$\;\1;p' go.mod)
35
- # RUNC_COMMIT := $(shell sed -n 's;\tgithub.com/opencontainers/runc \([^ \n]*\).*$\;\1;p' go.mod)
36
- RUNC_COMMIT := v1.0.0-rc8
32
+ # we get GNU make 3.x in MacOS build envs, which wants # to be escaped in
33
+ # strings, while the 4.x we have on Linux doesn't. this is the documented
34
+ # workaround
35
+ COMMENT := \#
36
+ CNI_COMMIT := $(shell sed -n 's;^$(COMMENT ) github.com/containernetworking/cni \([^ \n]* \) .*$$;\1;p' vendor/modules.txt)
37
+ RUNC_COMMIT := $(shell sed -n 's;^$(COMMENT ) github.com/opencontainers/runc \([^ \n]* \) .*$$;\1;p' vendor/modules.txt)
37
38
LIBSECCOMP_COMMIT := release-2.3
38
39
39
40
EXTRA_LDFLAGS ?=
0 commit comments