-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
81 lines (66 loc) · 2.6 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
.PHONY: test
test:
bazel test \
//cmd/jarindexer/... \
//cmd/mergeindex/... \
//language/scala/... \
//pkg/... \
.PHONY: jarindex_protos
jarindex_protos:
bazel run //build/stack/gazelle/scala/jarindex:jarindex_go_compiled_sources.update
mv build/stack/gazelle/scala/jarindex/build/stack/gazelle/scala/jarindex/*.go build/stack/gazelle/scala/jarindex/
rm -rf build/stack/gazelle/scala/jarindex/build
.PHONY: parser_protos
parser_protos:
bazel run //build/stack/gazelle/scala/parse:parse_go_compiled_sources.update
mv build/stack/gazelle/scala/parse/build/stack/gazelle/scala/parse/*.go build/stack/gazelle/scala/parse/
rm -rf build/stack/gazelle/scala/parse/build
.PHONY: scalacache_protos
scalacache_protos:
bazel run //build/stack/gazelle/scala/cache:cache_go_compiled_sources.update
mv build/stack/gazelle/scala/cache/build/stack/gazelle/scala/cache/*.go build/stack/gazelle/scala/cache/
rm -rf build/stack/gazelle/scala/cache/build
.PHONY: scalapb_protos
scalapb_protos:
bazel run //scalapb:scalapb_go_compiled_sources.update
mv scalapb/scalapb/scalapb.pb.go scalapb/scalapb.pb.go
rm -rf scalapb/scalapb
.PHONY: semanticdb_protos
semanticdb_protos:
bazel run //scala/meta/semanticdb:semanticdb_go_compiled_sources.update
mv scala/meta/semanticdb/scala/meta/semanticdb/semanticdb.pb.go scala/meta/semanticdb/semanticdb.pb.go
rm -rf scala/meta/semanticdb/scala
.PHONY: protos
protos: jarindex_protos parser_protos scalacache_protos scalapb_protos semanticdb_protos
echo "Done."
.PHONY: docs
docs:
bazel build //docs/architecture:all
cp -f bazel-bin/docs/architecture/components.png docs/architecture
cp -f bazel-bin/docs/architecture/sequence.png docs/architecture
.PHONY: tidy
gazelle:
bazel run //:gazelle
.PHONY: tidy
tidy:
bazel run @go_sdk//:bin/go -- mod tidy
bazel run //:update_go_repositories
.PHONY: tools
tools:
go install github.com/vektra/mockery/v2@latest
.PHONY: mocks
mocks:
mockery --output pkg/resolver/mocks --dir=pkg/resolver --name=Universe
mockery --output pkg/resolver/mocks --dir=pkg/resolver --name=Scope
mockery --output pkg/resolver/mocks --dir=pkg/resolver --name=SymbolProvider
mockery --output pkg/resolver/mocks --dir=pkg/resolver --name=SymbolResolver
mockery --output pkg/resolver/mocks --dir=pkg/resolver --name=ConflictResolver
mockery --output pkg/parser/mocks --dir=pkg/parser --name=Parser
mockery --output pkg/scalarule/mocks --dir=pkg/scalarule --name=ProviderRegistry
.PHONY: gen
gen: mocks protos
.PHONY: goldens
goldens:
bazel run //pkg/semanticdb:semanticdb_test -- -update
update_provider_test_golden_files:
bazel run pkg/provider:provider_test -- -update