forked from ethereum-optimism/superchain-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
51 lines (33 loc) · 1.3 KB
/
justfile
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
set positional-arguments := true
set dotenv-load := true
alias t := test-all
alias l := lint-all
_lint DIRECTORY FLAGS='':
cd {{ DIRECTORY }} && golangci-lint run {{FLAGS}}
# Lint all Go code
lint-all: (_lint 'ops' '--fix') (_lint 'validation' '--fix')
_go-test DIRECTORY:
cd {{ DIRECTORY }} && go run gotest.tools/gotestsum@v1.12.0 --format testname ./...
_go-tidy DIRECTORY:
cd {{ DIRECTORY }} && go mod tidy
# Test all Go code in the ops module
test-ops: (_go-test 'ops')
# Unit test all Go code in the validation module, and do not run validation checks themselves
test-validation: (_go-test 'validation')
# Test all Go code
test-all: test-ops test-validation
# Tidying all go.mod files
tidy-all: tidy-ops tidy-validation
# Tidy the ops go.mod file
tidy-ops: (_go-tidy 'ops')
# Tidy the validation go.mod file
tidy-validation: (_go-tidy 'validation')
_run_ops_bin bin flags='':
cd ops && go build -o ./bin/{{ bin }} ./cmd/{{ bin }}/main.go
./ops/bin/{{ bin }} {{flags}}
apply-hardforks: (_run_ops_bin 'apply_hardforks')
sync-staging flags='': (_run_ops_bin 'sync_staging' flags)
check-staging: (_run_ops_bin 'sync_staging' '--check')
print-staging-report: (_run_ops_bin 'print_staging_report')
check-genesis-integrity: (_run_ops_bin 'check_genesis_integrity')
codegen: (_run_ops_bin 'codegen')