mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 13:23:05 +07:00
Fix grpc_php_plugin setup
This commit is contained in:
parent
a094f682be
commit
248394635c
@ -1,13 +1,12 @@
|
|||||||
add_bazel() {
|
add_bazel() {
|
||||||
if [ ! "$(command -v bazel)" ]; then
|
if ! command -v bazel; then
|
||||||
os=$(uname -s)
|
if [ "$(uname -s)" = "Linux" ]; then
|
||||||
if [ "$os" = "Linux" ]; then
|
|
||||||
${apt_install:?} curl gnupg
|
${apt_install:?} curl gnupg
|
||||||
get -s -n "" https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
|
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
|
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
|
sudo "${debconf_fix:?}" apt-get update -y
|
||||||
${apt_install:?} bazel
|
${apt_install:?} bazel
|
||||||
elif [ "$os" = "Darwin" ]; then
|
else
|
||||||
brew install bazel
|
brew install bazel
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -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
|
get -s -n "" "https://github.com/grpc/grpc/archive/$grpc_tag.tar.gz" | tar -xz -C /tmp
|
||||||
cd "/tmp/grpc-${grpc_tag:1}" || exit
|
cd "/tmp/grpc-${grpc_tag:1}" || exit
|
||||||
add_bazel
|
add_bazel
|
||||||
echo "os: $os"
|
[ "$(uname -s)" = "Darwin" ] && sudo xcode-select -s /Applications/Xcode_11.7.app
|
||||||
echo "release: $DISTRIB_RELEASE"
|
|
||||||
if [ "$DISTRIB_RELEASE" = "16.04" ]; then
|
if [ "$DISTRIB_RELEASE" = "16.04" ]; then
|
||||||
CC="$(command -v gcc)" CXX="$(command -v g++)" ./tools/bazel build src/compiler:grpc_php_plugin
|
CC="$(command -v gcc)" CXX="$(command -v g++)" ./tools/bazel build src/compiler:grpc_php_plugin
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user