Skip to content

Commit

Permalink
Fix grpc_php_plugin setup
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Nov 20, 2020
1 parent a094f68 commit 2483946
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/scripts/tools/grpc_php_plugin.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
add_bazel() {
if [ ! "$(command -v bazel)" ]; then
os=$(uname -s)
if [ "$os" = "Linux" ]; then
if ! command -v bazel; then
if [ "$(uname -s)" = "Linux" ]; then
${apt_install:?} curl gnupg
get -s -n "" https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
sudo "${debconf_fix:?}" apt-get update -y
${apt_install:?} bazel
elif [ "$os" = "Darwin" ]; then
else
brew install bazel
fi
fi
Expand All @@ -33,8 +32,7 @@ add_grpc_php_plugin() {
get -s -n "" "https://github.com/grpc/grpc/archive/$grpc_tag.tar.gz" | tar -xz -C /tmp
cd "/tmp/grpc-${grpc_tag:1}" || exit
add_bazel
echo "os: $os"
echo "release: $DISTRIB_RELEASE"
[ "$(uname -s)" = "Darwin" ] && sudo xcode-select -s /Applications/Xcode_11.7.app
if [ "$DISTRIB_RELEASE" = "16.04" ]; then
CC="$(command -v gcc)" CXX="$(command -v g++)" ./tools/bazel build src/compiler:grpc_php_plugin
else
Expand Down

0 comments on commit 2483946

Please sign in to comment.