Skip to content

Commit

Permalink
buildscripts: OS X env should be in macos.sh
Browse files Browse the repository at this point in the history
unix.sh is shared by multiple OSes and environments. Clear JAVA_HOME,
since we never want to use that as PATH is more reliable, better
supported, and more typical.
  • Loading branch information
ejona86 committed Sep 12, 2024
1 parent 5de65a6 commit 15cd2f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 3 additions & 0 deletions buildscripts/kokoro/macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ export GRADLE_FLAGS="${GRADLE_FLAGS:-} --max-workers=2"
. "$GRPC_JAVA_DIR"/buildscripts/kokoro/kokoro.sh
trap spongify_logs EXIT

export -n JAVA_HOME
export PATH="$(/usr/libexec/java_home -v"1.8.0")/bin:${PATH}"

"$GRPC_JAVA_DIR"/buildscripts/kokoro/unix.sh
5 changes: 0 additions & 5 deletions buildscripts/kokoro/unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ readonly GRPC_JAVA_DIR="$(cd "$(dirname "$0")"/../.. && pwd)"
# cd to the root dir of grpc-java
cd $(dirname $0)/../..

# TODO(zpencer): always make sure we are using Oracle jdk8
if [[ -f /usr/libexec/java_home ]]; then
JAVA_HOME=$(/usr/libexec/java_home -v"1.8.0")
fi

# ARCH is x86_64 unless otherwise specified.
ARCH="${ARCH:-x86_64}"

Expand Down

0 comments on commit 15cd2f9

Please sign in to comment.