-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (28 loc) · 848 Bytes
/
Makefile
File metadata and controls
39 lines (28 loc) · 848 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
VERSION ?= $(shell sh versions.sh worker)
FERRET_VERSION = $(shell sh versions.sh ferret)
DIR_BIN = ./bin
.PHONY: build
default: compile start
build: lint test compile
compile:
go build -v -o ${DIR_BIN}/worker \
-ldflags "-X main.version=${VERSION} -X main.ferretVersion=${FERRET_VERSION}" \
./main.go
install-tools:
go install honnef.co/go/tools/cmd/staticcheck@latest && \
go install golang.org/x/tools/cmd/goimports@latest && \
go install github.com/mgechev/revive@latest
install-packages:
go mod tidy
install: install-tools install-packages
test:
go test ./
start:
./bin/worker
fmt:
go fmt ./... && \
goimports -w -local github.com/MontFerret ./internal ./pkg main.go
lint:
go vet ./... && \
staticcheck ./... && \
revive -config revive.toml -formatter stylish -exclude ./pkg/parser/fql/... -exclude ./vendor/... ./...