Skip to content

Commit cb86684

Browse files
committed
Package the JDK into jdk.app on macOS (#48765)
This commit packages the bundled JDK into jdk.app on macOS to assist with notarization there.
1 parent 81d4b12 commit cb86684

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

distribution/archives/build.gradle

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,14 @@ CopySpec archiveFiles(CopySpec modulesFiles, String distributionType, String pla
6161
with binFiles(distributionType, oss, jdk)
6262
}
6363
if (jdk) {
64-
into('jdk') {
65-
with jdkFiles(project, platform)
64+
if ("darwin".equals(platform)) {
65+
into('jdk.app') {
66+
with jdkFiles(project, platform)
67+
}
68+
} else {
69+
into('jdk') {
70+
with jdkFiles(project, platform)
71+
}
6672
}
6773
}
6874
into('') {

distribution/src/bin/elasticsearch-env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ if [ ! -z "$JAVA_HOME" ]; then
4141
JAVA_TYPE="JAVA_HOME"
4242
else
4343
if [ "$(uname -s)" = "Darwin" ]; then
44-
# OSX has a different structure
45-
JAVA="$ES_HOME/jdk/Contents/Home/bin/java"
44+
# macOS has a different structure
45+
JAVA="$ES_HOME/jdk.app/Contents/Home/bin/java"
4646
else
4747
JAVA="$ES_HOME/jdk/bin/java"
4848
fi

0 commit comments

Comments
 (0)