From a6f82d884c3f516b9042a20ea116ce9596a89362 Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Mon, 19 Dec 2016 14:31:03 +0100 Subject: [PATCH 1/4] Add ARM target for binaries ``` $ make build-cross dist VERSION=v2.2.0 CGO_ENABLED=0 gox -output="_dist/{{.OS}}-{{.Arch}}/{{.Dir}}" -osarch='darwin/amd64 linux/amd64 linux/386 windows/amd64 linux/arm' -tags '' -ldflags ' -X k8s.io/helm/pkg/version .Version=v2.1.0 -X k8s.io/helm/pkg/version.GitCommit=b3d812b3462e5ac8192f656c7098b1b54f29ffa3 -X k8s.io/helm/pkg/version.GitTreeState=dirty -extldflags "-static"' k8s.io/helm/cm d/helm Number of parallel builds: 3 --> darwin/amd64: k8s.io/helm/cmd/helm --> linux/amd64: k8s.io/helm/cmd/helm --> windows/amd64: k8s.io/helm/cmd/helm --> linux/386: k8s.io/helm/cmd/helm --> linux/arm: k8s.io/helm/cmd/helm ``` ``` $ ls -a _dist/ . darwin-amd64 helm-v2.2.0-linux-386.tar.gz helm-v2.2.0-linux-arm.tar.gz linux-386 linux-arm .. helm-v2.2.0-darwin-amd64.tar.gz helm-v2.2.0-linux-amd64.tar.gz helm-v2.2.0-windows-amd64.tar.gz linux-amd64 windows-amd64 ``` --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0424e801d..00a56e4e1 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ DOCKER_REGISTRY ?= gcr.io IMAGE_PREFIX ?= kubernetes-helm SHORT_NAME ?= tiller -TARGETS = darwin/amd64 linux/amd64 linux/386 windows/amd64 +TARGETS = darwin/amd64 linux/amd64 linux/386 linux/arm windows/amd64 DIST_DIRS = find * -type d -exec # go option From f80f468d9aa4660ada61dbe4d1de9d828a7b5657 Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Mon, 19 Dec 2016 14:46:25 +0100 Subject: [PATCH 2/4] Update Makefile --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 00a56e4e1..fd9399f1b 100644 --- a/Makefile +++ b/Makefile @@ -30,6 +30,7 @@ build: build-cross: LDFLAGS += -extldflags "-static" build-cross: CGO_ENABLED=0 gox -output="_dist/{{.OS}}-{{.Arch}}/{{.Dir}}" -osarch='$(TARGETS)' $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' k8s.io/helm/cmd/helm + CGO_ENABLED=0 gox -output="_dist/{{.OS}}-{{.Arch}}/{{.Dir}}" -osarch='$(TARGETS)' $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' k8s.io/helm/cmd/tiller .PHONY: dist dist: From b71a93e3919b590c6a8f0ffc0d7b54b6e905c91b Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Tue, 20 Dec 2016 08:45:35 +0100 Subject: [PATCH 3/4] Split packages Split helm and tiller packages. --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index fd9399f1b..d8ca963b5 100644 --- a/Makefile +++ b/Makefile @@ -25,12 +25,11 @@ all: build build: GOBIN=$(BINDIR) $(GO) install $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' k8s.io/helm/cmd/... -# usage: make build-cross dist VERSION=v2.0.0-alpha.3 +# usage: make clean build-cross dist APP=helm|tiller VERSION=v2.0.0-alpha.3 .PHONY: build-cross build-cross: LDFLAGS += -extldflags "-static" build-cross: - CGO_ENABLED=0 gox -output="_dist/{{.OS}}-{{.Arch}}/{{.Dir}}" -osarch='$(TARGETS)' $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' k8s.io/helm/cmd/helm - CGO_ENABLED=0 gox -output="_dist/{{.OS}}-{{.Arch}}/{{.Dir}}" -osarch='$(TARGETS)' $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' k8s.io/helm/cmd/tiller + CGO_ENABLED=0 gox -output="_dist/{{.OS}}-{{.Arch}}/{{.Dir}}" -osarch='$(TARGETS)' $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' k8s.io/helm/cmd/$(APP) .PHONY: dist dist: @@ -39,7 +38,8 @@ dist: $(DIST_DIRS) cp ../LICENSE {} \; && \ $(DIST_DIRS) cp ../README.md {} \; && \ $(DIST_DIRS) tar -zcf helm-${VERSION}-{}.tar.gz {} \; && \ - $(DIST_DIRS) zip -r helm-${VERSION}-{}.zip {} \; \ + $(DIST_DIRS) zip -r helm-${VERSION}-{}.zip {} \; && \ + mv $(APP)-${VERSION}-*.* .. \ ) .PHONY: checksum From 77b105af91103b67dc1ec3533900d9c508dee84b Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Wed, 21 Dec 2016 09:31:40 +0100 Subject: [PATCH 4/4] Add default binary --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index d8ca963b5..85c3e196d 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ IMAGE_PREFIX ?= kubernetes-helm SHORT_NAME ?= tiller TARGETS = darwin/amd64 linux/amd64 linux/386 linux/arm windows/amd64 DIST_DIRS = find * -type d -exec +APP = helm # go option GO ?= go