From 4adefe95596d1a7a4ae4e024153769653ebf822a Mon Sep 17 00:00:00 2001 From: Ryan Neal Date: Mon, 3 Jul 2017 12:12:26 -0700 Subject: [PATCH] update to have release parts --- Makefile | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2f111ca..d33ee02 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,21 @@ help: ## Show this help. all: test build ## Run the tests and build the binary. -build: ## Build the binary. - go build -ldflags "-X github.com/netlify/gocommerce/cmd.Version=`git rev-parse HEAD`" +os = darwin +arch = amd64 + +build: test + @echo "Making gocommerce for $(os)/$(arch)" + GOOS=$(os) GOARCH=$(arch) go build -ldflags "-X github.com/netlify/gocommerce/cmd.Version=`git rev-parse HEAD`" + +build_linux: override os=linux +build_linux: build + +package: build + tar -czf gocommerce-$(os)-$(arch).tar.gz gocommerce + +package_linux: override os=linux +package_linux: package deps: ## Install dependencies. @go get -u github.com/golang/lint/golint