2018-04-25 09:35:38 +00:00
|
|
|
|
|
|
|
# https://github.com/google/protobuf/releases
|
|
|
|
# Unzip
|
2018-05-11 11:36:29 +00:00
|
|
|
#unzip protoc-3.5.1-linux-x86_64.zip -d protoc3
|
2018-04-25 09:35:38 +00:00
|
|
|
|
|
|
|
# Move protoc to /usr/local/bin/
|
|
|
|
#sudo mv protoc3/bin/* /usr/local/bin/
|
|
|
|
|
|
|
|
# Move protoc3/include to /usr/local/include/
|
|
|
|
#sudo mv protoc3/include/* /usr/local/include/
|
|
|
|
|
|
|
|
# For go
|
|
|
|
#go get -u github.com/golang/protobuf/protoc-gen-go
|
|
|
|
|
|
|
|
# Optional: change owner
|
|
|
|
#sudo chown $USER /usr/local/bin/protoc
|
|
|
|
#sudo chown -R $USER /usr/local/include/google
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protoc -I src/main/proto/ src/main/proto/central-api.proto --go_out=plugins=grpc:golang
|