commit
a9f97ec2dc
10
Makefile
10
Makefile
|
@ -15,7 +15,13 @@
|
|||
GOOS ?= $(shell go env GOOS)
|
||||
GOARCH ?= $(shell go env GOARCH)
|
||||
BUILD_DIR ?= ./out
|
||||
GOPATH ?= $(shell pwd)/.gopath
|
||||
|
||||
ifeq ($(IN_DOCKER),1)
|
||||
GOPATH := /go
|
||||
else
|
||||
GOPATH := $(shell pwd)/.gopath
|
||||
endif
|
||||
|
||||
REPOPATH ?= k8s.io/minikube
|
||||
export GO15VENDOREXPERIMENT=1
|
||||
|
||||
|
@ -34,7 +40,7 @@ out/localkube: .gopath
|
|||
ifeq ($(GOOS),linux)
|
||||
CGO_ENABLED=1 go build -ldflags="-s" -o $(BUILD_DIR)/localkube ./cmd/localkube
|
||||
else
|
||||
docker run -w /go/src/k8s.io/minikube -e GOPATH=/go -v $(shell pwd):/go/src/k8s.io/minikube golang:1.6 make out/localkube
|
||||
docker run -w /go/src/k8s.io/minikube -e IN_DOCKER=1 -v $(shell pwd):/go/src/k8s.io/minikube golang:1.6 make out/localkube
|
||||
endif
|
||||
|
||||
out/minikube-$(GOOS)-$(GOARCH): .gopath pkg/minikube/cluster/localkubecontents.go
|
||||
|
|
Loading…
Reference in New Issue