From dd7cebc39f3d82f1727b3b3c7e17710bc21c593c Mon Sep 17 00:00:00 2001 From: Adam Reese <adam@reese.io> Date: Thu, 11 Aug 2016 09:24:25 -0700 Subject: [PATCH] feat(Makefile): add target for building releases * Add README and License files to archive * Compress archives for smaller download size https://github.com/kubernetes/helm/issues/999 --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Makefile b/Makefile index 90a9cc730..7216bb3e7 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ LDFLAGS := GOFLAGS := BINDIR := $(CURDIR)/bin BINARIES := helm tiller +DIST_DIRS := find * -type d -exec .PHONY: all all: build @@ -24,6 +25,17 @@ build: build-cross: gox -output="_dist/{{.OS}}-{{.Arch}}/{{.Dir}}" -os="darwin linux windows" -arch="amd64 386" $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' k8s.io/helm/cmd/... +# usage: make dist VERSION=v2.0.0-alpha.3 +.PHONY: dist +dist: build-cross + ( \ + cd _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 {} \; \ + ) + .PHONY: check-docker check-docker: @if [ -z $$(which docker) ]; then \ -- GitLab