generated from ethereum-optimism/.github
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
57 lines (45 loc) · 1.87 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
COMPOSEFLAGS=-d
OP_STACK_GO_BUILDER?=us-docker.pkg.dev/oplabs-tools-artifacts/images/op-stack-go:latest
build: build-go
.PHONY: build
build-go: op-monitorism op-defender
.PHONY: build-go
golang-docker:
# We don't use a buildx builder here, and just load directly into regular docker, for convenience.
GIT_COMMIT=$$(git rev-parse HEAD) \
GIT_DATE=$$(git show -s --format='%ct') \
IMAGE_TAGS=$$(git rev-parse HEAD),latest \
docker buildx bake \
--progress plain \
--load \
-f docker-bake.hcl \
op-monitorism op-defender
.PHONY: golang-docker
op-monitorism:
make -C ./op-monitorism
.PHONY: op-monitorism
op-defender:
make -C ./op-defender
.PHONY: op-defender
op-defender-lint-go: ## Lints Go code with specific linters
cd op-defender && golangci-lint run -E goimports,sqlclosecheck,bodyclose,asciicheck,misspell,errorlint --timeout 5m -e "errors.As" -e "errors.Is" ./...
.PHONY: op-defender-lint-go
op-defender-lint-go-fix: ## Lints Go code with specific linters and fixes reported issues
cd op-defender && golangci-lint run -E goimports,sqlclosecheck,bodyclose,asciicheck,misspell,errorlint --timeout 5m -e "errors.As" -e "errors.Is" ./... --fix
.PHONY: op-defender-lint-go-fix
op-monitorism-lint-go: ## Lints Go code with specific linters
cd op-monitorism && golangci-lint run -E goimports,sqlclosecheck,bodyclose,asciicheck,misspell,errorlint --timeout 5m -e "errors.As" -e "errors.Is" ./...
.PHONY: op-monitorism-lint-go
op-monitorism-lint-go-fix: ## Lints Go code with specific linters and fixes reported issues
cd op-monitorism && golangci-lint run -E goimports,sqlclosecheck,bodyclose,asciicheck,misspell,errorlint --timeout 5m -e "errors.As" -e "errors.Is" ./... --fix
.PHONY: op-monitorism-lint-go-fix
tidy:
make -C ./op-monitorism tidy
make -C ./op-defender tidy
.PHONY: tidy
clean:
rm -rf ./bin
.PHONY: clean
nuke: clean devnet-clean
git clean -Xdf
.PHONY: nuke