Skip to content

Commit

Permalink
feat: add go-grpc plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
zepatrik committed Nov 23, 2020
1 parent 75b1e1b commit 29a69c2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripts/executor-info.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -euo pipefail

UNAME_OS=$(uname -s)
UNAME_ARCH=$(uname -m)
Expand Down
14 changes: 14 additions & 0 deletions scripts/install-go-grpc-plugin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
set -euo pipefail

source scripts/executor-info.sh

PLUGIN_VERSION=$1

if [ ! -f ".bin/protoc-gen-go-grpc" ] || .bin/protoc-gen-go-grpc --version | grep -q "$PLUGIN_VERSION"; then
echo "Installing protobuf-gen-go-grpc $PLUGIN_VERSION for OS $UNAME_OS Arch $UNAME_ARCH"
mkdir -p .bin
curl --fail -sSL "https://github.com/grpc/grpc-go/releases/download/cmd%2Fprotoc-gen-go-grpc%2F$PLUGIN_VERSION/protoc-gen-go-grpc.$PLUGIN_VERSION.$NORMALIZED_OS.$NORMALIZED_ARCH.tar.gz" -o .bin/protoc-gen-go-grpc.tar.gz
tar -xf .bin/protoc-gen-go-grpc.tar.gz -C .bin
chmod +x .bin/protoc-gen-go-grpc
fi
1 change: 1 addition & 0 deletions scripts/install-go-plugin.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -euo pipefail

source scripts/executor-info.sh

Expand Down

0 comments on commit 29a69c2

Please sign in to comment.