@@ -5,10 +5,13 @@ PROTOWRAP=hack/bin/protowrap
5
5
PROTOC_GEN_GO =hack/bin/protoc-gen-go
6
6
PROTOC_GEN_STARPC =hack/bin/protoc-gen-go-starpc
7
7
PROTOC_GEN_VTPROTO =hack/bin/protoc-gen-go-vtproto
8
+ PROTOC_GEN_GO_DRPC =hack/bin/protoc-gen-go-drpc
8
9
GOIMPORTS =hack/bin/goimports
9
10
GOFUMPT =hack/bin/gofumpt
10
11
GOLANGCI_LINT =hack/bin/golangci-lint
11
12
GO_MOD_OUTDATED =hack/bin/go-mod-outdated
13
+ WASMSERVE =hack/bin/wasmserve
14
+ GORELEASER =hack/bin/goreleaser
12
15
GOLIST =go list -f "{{ .Dir }}" -m
13
16
14
17
export GO111MODULE =on
@@ -32,6 +35,12 @@ $(PROTOC_GEN_VTPROTO):
32
35
-o ./bin/protoc-gen-go-vtproto \
33
36
github.com/planetscale/vtprotobuf/cmd/protoc-gen-go-vtproto
34
37
38
+ $(PROTOC_GEN_GO_DRPC ) :
39
+ cd ./hack; \
40
+ go build -v \
41
+ -o ./bin/protoc-gen-go-drpc \
42
+ storj.io/drpc/cmd/protoc-gen-go-drpc
43
+
35
44
$(PROTOC_GEN_STARPC ) :
36
45
cd ./hack; \
37
46
go build -v \
@@ -68,8 +77,20 @@ $(GO_MOD_OUTDATED):
68
77
-o ./bin/go-mod-outdated \
69
78
github.com/psampaz/go-mod-outdated
70
79
80
+ $(WASMSERVE ) :
81
+ cd ./hack; \
82
+ go build -v \
83
+ -o ./bin/wasmserve \
84
+ github.com/hajimehoshi/wasmserve
85
+
86
+ $(GORELEASER ) :
87
+ cd ./hack; \
88
+ go build -v \
89
+ -o ./bin/goreleaser \
90
+ github.com/goreleaser/goreleaser
91
+
71
92
.PHONY : gengo
72
- gengo : vendor $(GOIMPORTS ) $(PROTOWRAP ) $(PROTOC_GEN_GO ) $(PROTOC_GEN_VTPROTO ) $(PROTOC_GEN_STARPC )
93
+ gengo : $(GOIMPORTS ) $(PROTOWRAP ) $(PROTOC_GEN_GO ) $(PROTOC_GEN_VTPROTO ) $( PROTOC_GEN_GO_DRPC ) $(PROTOC_GEN_STARPC )
73
94
shopt -s globstar; \
74
95
set -eo pipefail; \
75
96
export PROJECT=$$(go list -m ) ; \
@@ -82,6 +103,10 @@ gengo: vendor $(GOIMPORTS) $(PROTOWRAP) $(PROTOC_GEN_GO) $(PROTOC_GEN_VTPROTO) $
82
103
--go_out=$$(pwd ) /vendor \
83
104
--go-vtproto_out=$$(pwd ) /vendor \
84
105
--go-vtproto_opt=features=marshal+unmarshal+size+equal+clone \
106
+ --go-drpc_out=$$(pwd ) /vendor \
107
+ --go-drpc_opt=json=false \
108
+ --go-drpc_opt=protolib=github.com/golang/protobuf/proto \
109
+ --go-drpc_opt=protolib=github.com/planetscale/vtprotobuf/codec/drpc \
85
110
--go-starpc_out=$$(pwd ) /vendor \
86
111
--proto_path $$(pwd ) /vendor \
87
112
--print_structure \
@@ -98,7 +123,7 @@ node_modules:
98
123
yarn install
99
124
100
125
.PHONY : gents
101
- gents : vendor $(PROTOWRAP ) node_modules
126
+ gents : $(PROTOWRAP ) node_modules
102
127
shopt -s globstar; \
103
128
set -eo pipefail; \
104
129
export PROJECT=$$(go list -m ) ; \
@@ -131,7 +156,7 @@ gents: vendor $(PROTOWRAP) node_modules
131
156
npm run format:js
132
157
133
158
.PHONY : genproto
134
- genproto : gents gengo
159
+ genproto : gengo gents
135
160
136
161
.PHONY : gen
137
162
gen : genproto
@@ -161,6 +186,10 @@ format: $(GOFUMPT) $(GOIMPORTS)
161
186
test :
162
187
go test -v ./...
163
188
189
+ .PHONY : release
190
+ release : $(GORELEASER )
191
+ $(GORELEASER ) release --clean
192
+
164
193
.PHONY : serve-example
165
194
serve-example : $(WASMSERVE )
166
195
$(WASMSERVE ) -http " :8090" ./examples/websocket-browser-link/browser
0 commit comments