1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-01-08 03:13:15 +02:00
ferret/Makefile

50 lines
1.1 KiB
Makefile
Raw Normal View History

.PHONY: build install compile test e2e doc fmt lint vet release
2018-09-18 22:42:38 +02:00
DIR_BIN = ./bin
DIR_PKG = ./pkg
2018-10-14 21:38:14 +02:00
DIR_E2E = ./e2e
2018-09-18 22:42:38 +02:00
default: build
build: vet generate test compile
2018-09-18 22:42:38 +02:00
install:
go get
2018-09-26 03:49:42 +02:00
compile:
go build -race -v -o ${DIR_BIN}/ferret \
${DIR_E2E}/cli.go
2018-09-18 22:42:38 +02:00
test:
go test -race ${DIR_PKG}/...
cover:
2018-11-05 18:36:55 +02:00
go test -race -coverprofile=coverage.txt -covermode=atomic ${DIR_PKG}/... && \
2018-10-26 04:13:41 +02:00
curl -s https://codecov.io/bash | bash
2018-09-18 22:42:38 +02:00
2018-10-14 21:38:14 +02:00
e2e:
lab --timeout=120 --attempts=5 --concurrency=1 --wait=http://127.0.0.1:9222/json/version --runtime=bin://./bin/ferret --files=./e2e/tests --cdn=./e2e/pages/dynamic --cdn=./e2e/pages/static
2018-10-14 21:38:14 +02:00
2018-10-25 01:40:57 +02:00
bench:
go test -run=XXX -bench=. ${DIR_PKG}/...
2018-09-18 22:42:38 +02:00
generate:
2018-09-27 23:03:49 +02:00
go generate ${DIR_PKG}/...
2018-09-18 22:42:38 +02:00
doc:
godoc -http=:6060 -index
# http://golang.org/cmd/go/#hdr-Run_gofmt_on_package_sources
fmt:
go fmt ${DIR_PKG}/...
2018-09-18 22:42:38 +02:00
2018-10-06 00:59:42 +02:00
# https://github.com/mgechev/revive
# go get github.com/mgechev/revive
2018-09-18 22:42:38 +02:00
lint:
revive -config revive.toml -formatter stylish -exclude ./pkg/parser/fql/... -exclude ./vendor/... ./...
2018-09-18 22:42:38 +02:00
# http://godoc.org/code.google.com/p/go.tools/cmd/vet
# go get code.google.com/p/go.tools/cmd/vet
vet:
go vet ${DIR_PKG}/...