You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Open-IM-Server/pkg/proto/auto_proto.sh

18 lines
455 B

#!/usr/bin/env bash
source ./proto_dir.cfg
for ((i = 0; i < ${#all_proto[*]}; i++)); do
proto=${all_proto[$i]}
3 years ago
protoc -I ../../../ -I ./ --go_out=plugins=grpc:. $proto
s=`echo $proto | sed 's/ //g'`
v=${s//proto/pb.go}
protoc-go-inject-tag -input=./$v
echo "protoc --go_out=plugins=grpc:." $proto
done
echo "proto file generate success..."
3 years ago
find ./ -type f -path "*.pb.go"|xargs sed -i 's/\".\/sdk_ws\"/\"Open_IM\/pkg\/proto\/sdk_ws\"/g'