36 lines
780 B
Makefile
36 lines
780 B
Makefile
|
LINT_ARGS ?= ./...
|
||
|
export GO111MODULE := on
|
||
|
|
||
|
test: tidy
|
||
|
GO111MODULE=off go clean -testcache
|
||
|
go test -mod=vendor -v ./...
|
||
|
|
||
|
lint:
|
||
|
@GO111MODULE=off golangci-lint run -e '.*/pkg/mod' -e ".*/go/src" --enable-all --disable lll $(LINT_ARGS)
|
||
|
|
||
|
tidy:
|
||
|
go mod tidy
|
||
|
|
||
|
vendor: tidy
|
||
|
go mod vendor
|
||
|
|
||
|
install-devtools: vendor
|
||
|
# Install modd
|
||
|
GO111MODULE=off go get -u github.com/cortesi/modd/cmd/modd
|
||
|
# Install golangci-lint
|
||
|
GO111MODULE=off go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
|
||
|
|
||
|
clean:
|
||
|
rm -rf ./bin
|
||
|
go clean -i -x -r -modcache
|
||
|
|
||
|
doc:
|
||
|
@echo "Open your browser to http://localhost:6060/pkg/forge.cadoles.com/Pyxis/orion/ to see the documentation"
|
||
|
@godoc -http=:6060
|
||
|
|
||
|
watch:
|
||
|
modd
|
||
|
|
||
|
|
||
|
.PHONY: test clean generate vendor install-devtools lint watch tidy doc bin/server
|