generated from sergeyWh1te/go-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (36 loc) · 1.13 KB
/
Makefile
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
40
41
42
43
44
45
46
47
### GO tools
# Makefile
generate-docker:
docker build -t lidofinance/onchain-mon:stable -f Dockerfile .
.PHONY: generate-docker
.PHONY: tools
tools:
cd tools && go mod vendor && go mod tidy && go mod verify && go generate -tags tools
.PHONY: vendor
vendor:
go mod tidy && go mod vendor && go mod verify
build:
go build -o ./bin/service ./cmd/service
.PHONY: build
fmt:
go fmt ./cmd/... && go fmt ./internal/...
vet:
go vet ./cmd/... && go vet ./internal/...
imports:
bin/goimports -local github.com/lidofinance/onchain-mon -w -d $(shell find . -type f -name '*.go'| grep -v "/vendor/\|/.git/\|/tools/")
fix-lint:
bin/golangci-lint run --config=.golangci.yml --fix ./cmd... ./internal/...
.PHONY: format
format: imports fmt vet fix-lint
.PHONY: lint
lint:
bin/golangci-lint run --config=.golangci.yml ./cmd... ./internal/...
outdated-deps:
go list -u -m -json -mod=readonly all
.PHONY: outdated-deps
generate-databus-objects:
for file in ./brief/databus/*.dto.json; do \
base_name=$$(basename $$file .dto.json); \
bin/jsonschema -p databus -o generated/databus/$$base_name.dto.go $$file; \
done
.PHONY: generate-databus-objects