build.sh 640 B

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