-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
58 lines (44 loc) · 1.35 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
58
gen-grpc-go:
protoc -I=protos --go_out=. --go-grpc_out=. protos/proto.proto
clean-grpc-go:
rm -rf generated/*.pb.go
gen-grpc-gateway:
protoc -I ./protos \
--go_out ./protos --go_opt paths=source_relative \
--go-grpc_out ./protos --go-grpc_opt paths=source_relative \
--grpc-gateway_out ./protos --grpc-gateway_opt paths=source_relative \
./protos/ahorcado/proto.proto \
./protos/auth/proto.proto
gen-grpc-gateway-swagger:
protoc -I ./protos \
--openapiv2_out ./openapiv2 \
./protos/ahorcado/proto.proto \
./protos/auth/proto.proto
see-doc-swagger:
docker run -p 80:8080 \
-e SWAGGER_JSON=./openapiv2/ahorcado/proto.swagger.json \
-v /openapiv2:/openapiv2 \
swaggerapi/swagger-ui
clean-grpc-gateway:
rm -rf protos/ahorcado/*.pb.gw.go
compile-go-js:
gopherjs build --minify cmd/clients/js/client.go -o cmd/clients/js/html/index.js
setup-site-github:
cp cmd/clients/js/html/index.html ./docs
cp cmd/clients/js/html/index.js ./docs
clean-site-github:
rm -rf docs/*
start:
go run cmd/server/server.go
gen-cert:
cd cert; ./gen.sh; cd ..
coverage:
go test ./... -coverprofile=coverage.out -count=1
tls-generate:
openssl x509 -req -days 365 -in localhost.csr -signkey localhost.key -out localhost.crt
test:
protoc \
--include_imports \
--include_source_info \
--descriptor_set_out out.pb \
protos/ahorcado/proto.proto