Skip to content

Commit 23e503d

Browse files
committed
add modgraph
1 parent 5df4c9b commit 23e503d

File tree

3 files changed

+69
-5
lines changed

3 files changed

+69
-5
lines changed

Makefile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
.PHONY: gomods
22
gomods: ## Install gomods
3-
go install github.com/jmank88/gomods@v0.1.5
3+
go install github.com/jmank88/gomods@v0.1.6
44

55
.PHONY: gomodtidy
66
gomodtidy: gomods
7-
gomods tidy
7+
gomods -s proto_vendor tidy
88

99
.PHONY: docs
1010
docs:
@@ -34,8 +34,8 @@ 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
38-
export PATH="$(HOME)/.local/bin:$(PATH)"; gomods -go generate -x ./...
37+
generate: mockery install-protoc gomods cre-protoc modgraph
38+
export PATH="$(HOME)/.local/bin:$(PATH)"; gomods -s proto_vendor -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

4141
.PHONY: cre-protoc
@@ -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: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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/workflows/go
23+
click chainlink-protos/workflows/go href "https://github.com/smartcontractkit/chainlink-protos"
24+
freeport
25+
click freeport href "https://github.com/smartcontractkit/freeport"
26+
grpc-proxy
27+
click grpc-proxy href "https://github.com/smartcontractkit/grpc-proxy"
28+
libocr
29+
click libocr href "https://github.com/smartcontractkit/libocr"
30+
31+
subgraph chainlink-common-repo[chainlink-common]
32+
chainlink-common
33+
chainlink-common/pkg/monitoring
34+
chainlink-common/pkg/values
35+
chainlink-common/pkg/workflows/sdk/v2/pb
36+
end
37+
click chainlink-common-repo href "https://github.com/smartcontractkit/chainlink-common"
38+
39+
subgraph chainlink-protos-repo[chainlink-protos]
40+
chainlink-protos/billing/go
41+
chainlink-protos/workflows/go
42+
end
43+
click chainlink-protos-repo href "https://github.com/smartcontractkit/chainlink-protos"
44+
45+
classDef outline stroke-dasharray:6,fill:none;
46+
class chainlink-common-repo,chainlink-protos-repo outline
47+
```

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 -s proto_vendor graph | modgraph -prefix github.com/smartcontractkit/
12+
echo "\`\`\`"

0 commit comments

Comments
 (0)