You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
372 B
Bash
22 lines
372 B
Bash
2 years ago
|
#!/bin/bash
|
||
|
|
||
|
wd=$(pwd)
|
||
|
output="$wd/hello"
|
||
|
|
||
|
rm -rf $output
|
||
|
|
||
|
goctl rpc protoc -I $wd "$wd/hello.proto" --go_out="$output/pb" --go-grpc_out="$output/pb" --zrpc_out="$output" --multiple
|
||
|
|
||
|
if [ $? -ne 0 ]; then
|
||
|
echo "Generate failed"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
GOPROXY="https://goproxy.cn,direct" && go mod tidy
|
||
|
|
||
|
if [ $? -ne 0 ]; then
|
||
|
echo "Tidy failed"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
go test ./...
|