Skip to content

Commit c8a4c9f

Browse files
committed
增减grpc-gateway一键部署的脚本
1 parent 3d2c345 commit c8a4c9f

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

files/install-grpc-gateway.sh

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
echo "1. downloading grpc-gateway release package v1.16.0"
4+
5+
rm -rf $GOPATH/src/github.com/grpc-ecosystem/grpc-gateway
6+
mkdir -p $GOPATH/src/github.com/grpc-ecosystem
7+
cd $GOPATH/src/github.com/grpc-ecosystem
8+
wget https://github.com/grpc-ecosystem/grpc-gateway/archive/v1.16.0.zip -O grpc-gateway.zip
9+
unzip grpc-gateway.zip
10+
rm -f grpc-gateway.zip
11+
mv grpc-gateway-1.16.0 grpc-gateway
12+
13+
echo "2. building grpc gateway"
14+
cd $GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
15+
go build
16+
go install
17+
18+
echo "3. building swagger"
19+
cd $GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
20+
go build
21+
go install
22+
23+
echo "4. downloading annonation files"
24+
cd ~
25+
wget https://github.com/protocolbuffers/protobuf/archive/v3.14.0.zip -O annonations.zip
26+
unzip annonations.zip
27+
rm -f annonations.zip
28+
cp -r protobuf-3.14.0/src/google/ $GOPATH/src/
29+
rm -rf protobuf-3.14.0
30+
31+
echo "finish"

0 commit comments

Comments
 (0)