Commit 7bc728bc authored by Adam Reese's avatar Adam Reese

Merge pull request #628 from adamreese/feat/build-faster

feat(Makefile): go build optimizations
parents 3c4ae013 aca9f0f8
...@@ -15,13 +15,11 @@ GOFLAGS := ...@@ -15,13 +15,11 @@ GOFLAGS :=
BINDIR := ./bin BINDIR := ./bin
BINARIES := helm tiller BINARIES := helm tiller
include versioning.mk
.PHONY: all .PHONY: all
all: build all: build
.PHONY: build .PHONY: build
build: GOFLAGS += -a -installsuffix cgo build: GOFLAGS += -i
build: build:
@for i in $(BINARIES); do \ @for i in $(BINARIES); do \
CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) $(GO) build -o $(BINDIR)/$$i $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' ./cmd/$$i || exit 1; \ CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) $(GO) build -o $(BINDIR)/$$i $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' ./cmd/$$i || exit 1; \
...@@ -38,6 +36,7 @@ check-docker: ...@@ -38,6 +36,7 @@ check-docker:
docker-binary: GOOS = linux docker-binary: GOOS = linux
docker-binary: GOARCH = amd64 docker-binary: GOARCH = amd64
docker-binary: BINDIR = ./rootfs docker-binary: BINDIR = ./rootfs
docker-binary: GOFLAGS += -a -installsuffix cgo
docker-binary: build docker-binary: build
.PHONY: docker-build .PHONY: docker-build
...@@ -71,3 +70,4 @@ coverage: ...@@ -71,3 +70,4 @@ coverage:
bootstrap: bootstrap:
glide install glide install
include versioning.mk
...@@ -21,7 +21,7 @@ func rsFixture() *releaseServer { ...@@ -21,7 +21,7 @@ func rsFixture() *releaseServer {
} }
func releaseMock() *release.Release { func releaseMock() *release.Release {
date := timestamp.Timestamp{242085845, 0} date := timestamp.Timestamp{Seconds: 242085845, Nanos: 0}
return &release.Release{ return &release.Release{
Name: "angry-panda", Name: "angry-panda",
Info: &release.Info{ Info: &release.Info{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment