From 38831e4ccd83fc573ea872b4c92491144de03920 Mon Sep 17 00:00:00 2001 From: Luiz Filho Date: Wed, 8 Mar 2017 16:55:27 -0300 Subject: [PATCH] Adding makefile --- .gitignore | 1 + Makefile | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index e43b0f98..36a416ff 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .DS_Store +dist diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..3c0c1cc1 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +extension = $(patsubst windows,.exe,$(filter windows,$(1))) +PKG_NAME := helm-chart-publisher +define gocross + GOOS=$(1) GOARCH=$(2) go build -o ./dist/$(PKG_NAME)_$(1)-$(2)$(call extension,$(1)); +endef + +release: + ghr -draft -u luizbafilho $$TAG ./dist + +clean: + rm -Rf ./dist/* + +build-all: clean + $(call gocross,linux,amd64) + $(call gocross,linux,arm) + $(call gocross,darwin,amd64) + $(call gocross,windows,amd64) + +test: + go test -v -race `glide novendor` + +ghr: + go get -u github.com/tcnksm/ghr +