@@ -6,6 +6,7 @@ TINYGO ?= tinygo
6
6
WASMOPT ?= wasm-opt
7
7
BINDIR ?= ./bin
8
8
EXECUTABLE ?= ${BINDIR}/rolling-shutter
9
+ GOPATH ?= $(${GO} env GOPATH )
9
10
10
11
build :
11
12
${GO} build ${GOFLAGS} -o ${EXECUTABLE}
@@ -37,8 +38,8 @@ test: test-unit
37
38
test-all : test-unit test-integration
38
39
39
40
generate : install-codegen-tools
40
- ${GO} generate -skip=" gendocs.go " -x ./...
41
- ${GO} generate -run=" gendocs.go " -x ./...
41
+ ${GO} generate -skip=" make docs " -x ./...
42
+ ${GO} generate -run=" make docs " -x ./...
42
43
43
44
coverage :
44
45
${GO} test ${GOFLAGS} -covermode=count -coverprofile=coverage.out ./...
@@ -50,36 +51,41 @@ clean:
50
51
install-tools : install-codegen-tools install-golangci-lint install-cobra install-gofumpt install-gci install-gotestsum
51
52
52
53
# code generation tools: pin version
53
- install-codegen-tools : install-npm install-abigen install-sqlc install-protoc-gen-go install-oapi-codegen install-stringer install- go-enum install-cobra
54
+ install-codegen-tools : install-npm install-abigen install-sqlc install-protoc-gen-go install-oapi-codegen install-go-enum
54
55
55
- install -npm:
56
+ ../contracts/node_modules/.mark -npm-install : ../contracts/package.json ../contracts/package-lock.json
56
57
cd ../contracts && npm install
58
+ @touch ../contracts/node_modules/.mark-npm-install
57
59
58
- install-sqlc :
60
+ install-npm : ../contracts/node_modules/.mark-npm-install
61
+
62
+ ${GOPATH}/bin/sqlc :
59
63
${GO} install github.com/kyleconroy/sqlc/cmd/
[email protected]
64
+ install-sqlc : ${GOPATH}/bin/sqlc
65
+
60
66
61
- install- go-enum :
67
+ ${GOPATH}/bin/ go-enum :
62
68
${GO} install github.com/abice/
[email protected]
69
+ install-go-enum : ${GOPATH}/bin/go-enum
63
70
64
- install- abigen :
71
+ ${GOPATH}/bin/ abigen :
65
72
${GO} install github.com/ethereum/go-ethereum/cmd/
[email protected]
73
+ install-abigen : ${GOPATH}/bin/abigen
74
+
66
75
67
- install- protoc-gen-go :
76
+ ${GOPATH}/bin/ protoc-gen-go :
68
77
${GO} install google.golang.org/protobuf/cmd/
[email protected]
78
+ install-protoc-gen-go : ${GOPATH}/bin/protoc-gen-go
69
79
70
- install-oapi-codegen :
71
- ${GO} install github.com/deepmap/oapi-codegen/cmd/
[email protected]
72
80
73
- install-stringer :
74
- ${GO} install golang.org/x/tools/cmd/
[email protected]
81
+ ${GOPATH}/bin/oapi-codegen :
82
+ ${GO} install github.com/deepmap/oapi-codegen/cmd/
[email protected]
83
+ install-oapi-codegen : ${GOPATH}/bin/oapi-codegen
75
84
76
85
# non code generation tools
77
86
install-golangci-lint :
78
87
${GO} install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
79
88
80
- install-cobra :
81
- ${GO} install github.com/spf13/cobra-cli@latest
82
-
83
89
install-gofumpt :
84
90
${GO} install mvdan.cc/gofumpt@latest
85
91
0 commit comments