Skip to content

Commit 410e6b3

Browse files
committed
add modgraph
1 parent 5df4c9b commit 410e6b3

File tree

3 files changed

+71
-2
lines changed

3 files changed

+71
-2
lines changed

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ rm-builders:
3434
rm -f ./pkg/workflows/wasm/host/test/cmd/testmodule.wasm
3535

3636
.PHONY: generate
37-
generate: mockery install-protoc gomods cre-protoc
37+
generate: mockery install-protoc gomods cre-protoc modgraph
3838
export PATH="$(HOME)/.local/bin:$(PATH)"; gomods -go generate -x ./...
3939
find . -type f -name .mockery.yaml -execdir mockery \; ## Execute mockery for all .mockery.yaml files. If this fails, you might have a local mockery installed. Uninstall or update it.
4040

@@ -51,4 +51,9 @@ lint-workspace:
5151
@./script/lint.sh $(GOLANGCI_LINT_VERSION) "$(GOLANGCI_LINT_COMMON_OPTS)" $(GOLANGCI_LINT_DIRECTORY)
5252

5353
lint:
54-
@./script/lint.sh $(GOLANGCI_LINT_VERSION) "$(GOLANGCI_LINT_COMMON_OPTS)" $(GOLANGCI_LINT_DIRECTORY) "--new-from-rev=origin/main"
54+
@./script/lint.sh $(GOLANGCI_LINT_VERSION) "$(GOLANGCI_LINT_COMMON_OPTS)" $(GOLANGCI_LINT_DIRECTORY) "--new-from-rev=origin/main"
55+
56+
.PHONY: modgraph
57+
modgraph: gomods
58+
go install github.com/jmank88/modgraph@v0.1.0
59+
./modgraph > go.md

go.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
## Common modules and org dependencies
2+
```mermaid
3+
flowchart LR
4+
5+
chain-selectors
6+
click chain-selectors href "https://github.com/smartcontractkit/chain-selectors"
7+
chainlink-common --> chain-selectors
8+
chainlink-common --> chainlink-common/pkg/workflows/sdk/v2/pb
9+
chainlink-common --> chainlink-protos/billing/go
10+
chainlink-common --> freeport
11+
chainlink-common --> grpc-proxy
12+
chainlink-common --> libocr
13+
click chainlink-common href "https://github.com/smartcontractkit/chainlink-common"
14+
chainlink-common/pkg/monitoring --> chainlink-common
15+
click chainlink-common/pkg/monitoring href "https://github.com/smartcontractkit/chainlink-common"
16+
chainlink-common/pkg/values
17+
click chainlink-common/pkg/values href "https://github.com/smartcontractkit/chainlink-common"
18+
chainlink-common/pkg/workflows/sdk/v2/pb --> chainlink-common/pkg/values
19+
click chainlink-common/pkg/workflows/sdk/v2/pb href "https://github.com/smartcontractkit/chainlink-common"
20+
chainlink-protos/billing/go --> chainlink-protos/workflows/go
21+
click chainlink-protos/billing/go href "https://github.com/smartcontractkit/chainlink-protos"
22+
chainlink-protos/orchestrator --> wsrpc
23+
click chainlink-protos/orchestrator href "https://github.com/smartcontractkit/chainlink-protos"
24+
chainlink-protos/workflows/go
25+
click chainlink-protos/workflows/go href "https://github.com/smartcontractkit/chainlink-protos"
26+
freeport
27+
click freeport href "https://github.com/smartcontractkit/freeport"
28+
grpc-proxy
29+
click grpc-proxy href "https://github.com/smartcontractkit/grpc-proxy"
30+
libocr
31+
click libocr href "https://github.com/smartcontractkit/libocr"
32+
wsrpc
33+
click wsrpc href "https://github.com/smartcontractkit/wsrpc"
34+
35+
subgraph chainlink-common-repo[chainlink-common]
36+
chainlink-common
37+
chainlink-common/pkg/monitoring
38+
chainlink-common/pkg/values
39+
chainlink-common/pkg/workflows/sdk/v2/pb
40+
end
41+
click chainlink-common-repo href "https://github.com/smartcontractkit/chainlink-common"
42+
43+
subgraph chainlink-protos-repo[chainlink-protos]
44+
chainlink-protos/billing/go
45+
chainlink-protos/orchestrator
46+
chainlink-protos/workflows/go
47+
end
48+
click chainlink-protos-repo href "https://github.com/smartcontractkit/chainlink-protos"
49+
50+
classDef outline stroke-dasharray:6,fill:none;
51+
class chainlink-common-repo,chainlink-protos-repo outline
52+
```

modgraph

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
# Generates go.md
4+
5+
set -e
6+
7+
echo "## Common modules and org dependencies
8+
\`\`\`mermaid
9+
flowchart LR
10+
"
11+
gomods graph | modgraph -prefix github.com/smartcontractkit/
12+
echo "\`\`\`"

0 commit comments

Comments
 (0)