github.com/weedge/lib@v0.0.0-20230424045628-a36dcc1d90e4/client/etcd/cmd/scripts/gen.sh (about)

     1  #!/bin/bash -x
     2  set -e
     3  
     4  SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
     5  cd $SHELL_FOLDER
     6  cd ..
     7  
     8  OUT_DIR=./pb
     9  
    10  GOGOPROTO_ROOT="$(GO111MODULE=on go list -m -f '{{ .Dir }}' -m github.com/gogo/protobuf)"
    11  GOGOPROTO_PATH="${GOGOPROTO_ROOT}:${GOGOPROTO_ROOT}/protobuf"
    12  
    13  rm -rf $OUT_DIR/*.{go,json}
    14  
    15  protoc --gogofast_out=plugins=grpc:. \
    16      -I=. \
    17      -I="${GOGOPROTO_PATH}" \
    18      pb/hello.proto