Skip to content

Instantly share code, notes, and snippets.

@ademar111190
Created January 19, 2022 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ademar111190/53e3dcdb0e2a9b11e9c6661ec0ebbd17 to your computer and use it in GitHub Desktop.
Save ademar111190/53e3dcdb0e2a9b11e9c6661ec0ebbd17 to your computer and use it in GitHub Desktop.
install protoc
#!/usr/bin/env sh
# https://github.com/protocolbuffers/protobuf/releases
# PB_VERSION="3.19.3"
PB_VERSION="3.15.8"
# https://pkg.go.dev/google.golang.org/protobuf/cmd/protoc-gen-go?tab=versions
# PB_GEN_GO="1.27.1"
PB_GEN_GO="1.25.0"
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
PB_ZIP="protoc-${PB_VERSION}-osx-x86_64.zip"
curl -LO "${PB_REL}/download/v${PB_VERSION}/${PB_ZIP}"
sudo unzip -o $PB_ZIP -d /usr/local bin/protoc
sudo unzip -o $PB_ZIP -d /usr/local 'include/*'
rm -f $PB_ZIP
go get "google.golang.org/protobuf/cmd/protoc-gen-go@v${PB_GEN_GO}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment