From 672c2d3045a63460648715046ca31c6b0a56276b Mon Sep 17 00:00:00 2001 From: Florian Eitel Date: Sun, 11 Aug 2019 21:24:41 +0200 Subject: [PATCH] Refactor Makefile --- Makefile | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 73bfe2d..02f22c5 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,24 @@ +GOCMD=go +GOBUILD=$(GOCMD) build +GOCLEAN=$(GOCMD) clean +GOTEST=$(GOCMD) test +GOGET=$(GOCMD) get +BINARY_NAME=velux-cli + +all: build build: - go build + $(GOBUILD) -o $(BINARY_NAME) -v + +clean: + $(GOCLEAN) + rm -f $(BINARY_NAME) client models + +deps: + $(GOGET) github.com/go-swagger/go-swagger/cmd/swagger + $(GOGET) github.com/go-openapi/errors + $(GOGET) github.com/go-openapi/runtime + $(GOGET) github.com/go-openapi/runtime/client + $(GOGET) github.com/go-openapi/strfmt genclient: ../../../../bin/swagger generate client -f ./swagger.yaml - -install-deps: - go get -u github.com/go-swagger/go-swagger/cmd/swagger - go get -u github.com/go-openapi/errors - go get -u github.com/go-openapi/runtime - go get -u github.com/go-openapi/runtime/client - go get -u github.com/go-openapi/strfmt