forked from filecoin-project/go-fil-markets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (46 loc) · 1.19 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
all: build
.PHONY: all
SUBMODULES=
FFI_PATH:=./extern/filecoin-ffi/
FFI_DEPS:=.install-filcrypto
FFI_DEPS:=$(addprefix $(FFI_PATH),$(FFI_DEPS))
$(FFI_DEPS): .filecoin-build ;
.filecoin-build: $(FFI_PATH)
$(MAKE) -C $(FFI_PATH) $(FFI_DEPS:$(FFI_PATH)%=%)
@touch $@
.update-modules:
git submodule update --init --recursive
@touch $@
build: .update-modules .filecoin-build
go build ./...
test: build
gotestsum -- -coverprofile=coverage.txt -timeout 5m ./...
clean:
rm -f .filecoin-build
rm -f .update-modules
rm -f coverage.txt
DOTs=$(shell find docs -name '*.dot')
MMDs=$(shell find docs -name '*.mmd')
SVGs=$(DOTs:%=%.svg) $(MMDs:%=%.svg)
PNGs=$(DOTs:%=%.png) $(MMDs:%=%.png)
node_modules: package.json
npm install
diagrams: ${MMDs} ${SVGs} ${PNGs}
%.mmd.svg: %.mmd
node_modules/.bin/mmdc -i $< -o $@
%.mmd.png: %.mmd
node_modules/.bin/mmdc -i $< -o $@
FORCE:
docsgen: FORCE .update-modules .filecoin-build
go run ./docsgen
$(MMDs): docsgen node_modules
imports: FORCE
scripts/fiximports
cbor-gen: FORCE
go generate ./...
tidy: FORCE
go mod tidy
lint: FORCE
git fetch
golangci-lint run -v --concurrency 2 --new-from-rev origin/master
prepare-pr: cbor-gen tidy diagrams imports lint