Merge pull request #657 from adamreese/fix/cross-build

fix(Makefile): fix broken cross binary build
pull/661/head
Adam Reese 9 years ago
commit 34362c13bf

1
.gitignore vendored

@ -1,6 +1,5 @@
.coverage/ .coverage/
bin/ bin/
rootfs/helm
rootfs/tiller rootfs/tiller
vendor/ vendor/
_proto/*.pb.go _proto/*.pb.go

@ -4,8 +4,6 @@ SHORT_NAME ?= tiller
# go option # go option
GO ?= go GO ?= go
GOARCH ?= $(shell go env GOARCH)
GOOS ?= $(shell go env GOOS)
PKG := $(shell glide novendor) PKG := $(shell glide novendor)
TAGS := TAGS :=
TESTS := . TESTS := .
@ -30,11 +28,10 @@ check-docker:
fi fi
.PHONY: docker-binary .PHONY: docker-binary
docker-binary: GOOS = linux docker-binary: BINDIR = ./rootfs
docker-binary: GOARCH = amd64
docker-binary: BINDIR = $(CURDIR)/rootfs
docker-binary: GOFLAGS += -a -installsuffix cgo docker-binary: GOFLAGS += -a -installsuffix cgo
docker-binary: build docker-binary:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 $(GO) build -o $(BINDIR)/tiller $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' github.com/kubernetes/helm/cmd/tiller
.PHONY: docker-build .PHONY: docker-build
docker-build: check-docker docker-binary docker-build: check-docker docker-binary
@ -58,6 +55,7 @@ test-style:
.PHONY: clean .PHONY: clean
clean: clean:
@rm -rf $(BINDIR) @rm -rf $(BINDIR)
@rm ./rootfs/tiller
.PHONY: coverage .PHONY: coverage
coverage: coverage:

Loading…
Cancel
Save