Refactor Makefile

This commit is contained in:
Florian Eitel 2019-08-11 21:24:41 +02:00
parent c48026c797
commit 672c2d3045
Signed by: flo
GPG Key ID: 9987EAFEF6F686BB

View File

@ -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