Skip to content

Commit 9ff362c

Browse files
committed
fix: restore wasmserve and release targets
Signed-off-by: Christian Stewart <christian@aperture.us>
1 parent 30b1c5f commit 9ff362c

File tree

2 files changed

+33
-5
lines changed

2 files changed

+33
-5
lines changed

Makefile

+32-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ PROTOWRAP=hack/bin/protowrap
55
PROTOC_GEN_GO=hack/bin/protoc-gen-go
66
PROTOC_GEN_STARPC=hack/bin/protoc-gen-go-starpc
77
PROTOC_GEN_VTPROTO=hack/bin/protoc-gen-go-vtproto
8+
PROTOC_GEN_GO_DRPC=hack/bin/protoc-gen-go-drpc
89
GOIMPORTS=hack/bin/goimports
910
GOFUMPT=hack/bin/gofumpt
1011
GOLANGCI_LINT=hack/bin/golangci-lint
1112
GO_MOD_OUTDATED=hack/bin/go-mod-outdated
13+
WASMSERVE=hack/bin/wasmserve
14+
GORELEASER=hack/bin/goreleaser
1215
GOLIST=go list -f "{{ .Dir }}" -m
1316

1417
export GO111MODULE=on
@@ -32,6 +35,12 @@ $(PROTOC_GEN_VTPROTO):
3235
-o ./bin/protoc-gen-go-vtproto \
3336
github.com/planetscale/vtprotobuf/cmd/protoc-gen-go-vtproto
3437

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+
3544
$(PROTOC_GEN_STARPC):
3645
cd ./hack; \
3746
go build -v \
@@ -68,8 +77,20 @@ $(GO_MOD_OUTDATED):
6877
-o ./bin/go-mod-outdated \
6978
github.com/psampaz/go-mod-outdated
7079

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+
7192
.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)
7394
shopt -s globstar; \
7495
set -eo pipefail; \
7596
export PROJECT=$$(go list -m); \
@@ -82,6 +103,10 @@ gengo: vendor $(GOIMPORTS) $(PROTOWRAP) $(PROTOC_GEN_GO) $(PROTOC_GEN_VTPROTO) $
82103
--go_out=$$(pwd)/vendor \
83104
--go-vtproto_out=$$(pwd)/vendor \
84105
--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 \
85110
--go-starpc_out=$$(pwd)/vendor \
86111
--proto_path $$(pwd)/vendor \
87112
--print_structure \
@@ -98,7 +123,7 @@ node_modules:
98123
yarn install
99124

100125
.PHONY: gents
101-
gents: vendor $(PROTOWRAP) node_modules
126+
gents: $(PROTOWRAP) node_modules
102127
shopt -s globstar; \
103128
set -eo pipefail; \
104129
export PROJECT=$$(go list -m); \
@@ -131,7 +156,7 @@ gents: vendor $(PROTOWRAP) node_modules
131156
npm run format:js
132157

133158
.PHONY: genproto
134-
genproto: gents gengo
159+
genproto: gengo gents
135160

136161
.PHONY: gen
137162
gen: genproto
@@ -161,6 +186,10 @@ format: $(GOFUMPT) $(GOIMPORTS)
161186
test:
162187
go test -v ./...
163188

189+
.PHONY: release
190+
release: $(GORELEASER)
191+
$(GORELEASER) release --clean
192+
164193
.PHONY: serve-example
165194
serve-example: $(WASMSERVE)
166195
$(WASMSERVE) -http ":8090" ./examples/websocket-browser-link/browser

cmd/bifrost/cmd_daemon.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ package main
66
import (
77
"context"
88
"net/http"
9+
"net/http/pprof"
910
"os"
1011
"runtime"
1112
"time"
1213

13-
"net/http/pprof"
14-
1514
bcli "github.com/aperturerobotics/bifrost/cli"
1615
"github.com/aperturerobotics/bifrost/daemon"
1716
bifrost_api "github.com/aperturerobotics/bifrost/daemon/api"

0 commit comments

Comments
 (0)