build.sh 649 B

123456789101112131415161718192021222324252627
  1. export GOBIN=$(go env GOPATH)/bin
  2. export PATH=$PATH:$GOBIN
  3. export RPC_PATH=common
  4. go env
  5. go install google.golang.org/protobuf/compiler/protogen
  6. go install github.com/amsokol/protoc-gen-gotag
  7. # mkdir -p $RPC_PATH
  8. rm -f $RPC_PATH/*.pb.go
  9. protoc -I$RPC_PATH --go_out=plugins=grpc:$PWD $RPC_PATH/gostfix.proto
  10. protoc -I$RPC_PATH --gotag_out=xxx="bson+\"-\"",output_path=$RPC_PATH:. $RPC_PATH/gostfix.proto
  11. #echo "Installing data"
  12. #rm -rf data
  13. #mkdir data
  14. #cp -a main.ini data/
  15. #cp -a main.cf data/
  16. #cp -a vmailbox.db data/
  17. cp -a web/assets data/
  18. cp -a web/css data/
  19. cp -a web/js data/
  20. cp -a web/templates data/
  21. go build -o bin/gostfix
  22. go mod tidy