39 lines
921 B
Makefile
39 lines
921 B
Makefile
|
export PATH := $(PATH):/usr/local/go/bin
|
||
|
|
||
|
watch:
|
||
|
modd
|
||
|
|
||
|
deps: vendor
|
||
|
GO111MODULE=off go get -u golang.org/x/tools/cmd/godoc
|
||
|
GO111MODULE=off go get -u github.com/cortesi/modd/cmd/modd
|
||
|
GO111MODULE=off go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
|
||
|
|
||
|
build: vendor bin/server
|
||
|
|
||
|
release: vendor static doc
|
||
|
script/release
|
||
|
|
||
|
test:
|
||
|
GO111MODULE=off go clean -testcache
|
||
|
go test -race -v -mod=vendor -cover -tags=test $(TEST_ARGS) ./...
|
||
|
|
||
|
tidy:
|
||
|
go mod tidy
|
||
|
|
||
|
vendor: tidy
|
||
|
go mod vendor
|
||
|
|
||
|
bin/server: generate
|
||
|
CGO_ENABLED=0 go build -mod=vendor -v -o bin/server ./cmd/server
|
||
|
|
||
|
lint:
|
||
|
GO111MODULE=off golangci-lint run --enable-all --disable gochecknoglobals
|
||
|
|
||
|
clean:
|
||
|
rm -rf ./bin ./release ./vendor ./data
|
||
|
|
||
|
godoc:
|
||
|
@echo "open your browser to http://localhost:6060/pkg/forge.cadoles.com/Cadoles/ldap-profile to see the documentation"
|
||
|
godoc -http=:6060
|
||
|
|
||
|
.PHONY: test run clean generate vendor deps lint tidy release
|