mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-07 15:10:01 +08:00
22 lines
333 B
Bash
22 lines
333 B
Bash
#!/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
|
|
|
|
go mod tidy
|
|
|
|
if [ $? -ne 0 ]; then
|
|
echo "Tidy failed"
|
|
exit 1
|
|
fi
|
|
|
|
go test ./... |