Skip to content
Snippets Groups Projects
Commit 4c081f79 authored by David Trattnig's avatar David Trattnig
Browse files

chore(make): go path init, add init.dev target

Following is changed:
  - Initialize GOPATH for easier execution of the `api-docs` target
  - Add `init.dev` target for installing dev dependencies.
parent 15aadf70
No related branches found
No related tags found
No related merge requests found
......@@ -18,13 +18,15 @@
GOCMD := go
ifdef GOROOT
GOCMD = $(GOROOT)/bin/go
GOCMD = $(GOROOT)/bin/go
endif
SWAG := swag
ifdef GOPATH
SWAG = $(GOPATH)/bin/swag
ifndef $(GOPATH)
GOPATH=$(shell go env GOPATH)
export GOPATH
endif
SWAG = $(GOPATH)/bin/swag
SWAG_ARGS := -d api/v1/,cmd/tank/ -g api.go
EXECUTEABLE := tank
......@@ -32,6 +34,10 @@ EXECUTEABLE := tank
all: build
.PHONY: vet format ui build clean distclean
init.dev::
go get -u github.com/swaggo/swag/cmd/swag
go install github.com/swaggo/swag/cmd/swag@latest
vet:
$(GOCMD) vet ./...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment