mirror of
https://github.com/halcyon/asdf-java.git
synced 2024-10-06 07:42:09 +08:00
[macOS] Zulu install for /usr/libexec/java_home does not work (#138)
* Release is a file which results in the absolute_dir_path command to fail to return the expected result. Changed it to bin/.. Fixes https://github.com/halcyon/asdf-java/issues/137 * Added test to validate the /usr/libexec/java_home working as expected * Added information to the liberica install about it not being integrated in /usr/libexec/java_home * Only run the update-data on the main repository
This commit is contained in:
parent
38ca9d0bcc
commit
0010d1f98d
9
.github/workflows/tests.yml
vendored
9
.github/workflows/tests.yml
vendored
@ -36,3 +36,12 @@ jobs:
|
||||
run: |
|
||||
. asdf/asdf.sh
|
||||
asdf plugin-test java "$GITHUB_WORKSPACE" --asdf-plugin-gitref "$GITHUB_SHA" --asdf-tool-version adoptopenjdk-8.0.252+9.1.openj9-0.20.0 java -version
|
||||
- name: macOS Check java_home integration
|
||||
env:
|
||||
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
export ASDF_CONFIG_FILE=${HOME}"/.asdfrc"
|
||||
echo "java_macos_integration_enable = yes" > "${ASDF_CONFIG_FILE}"
|
||||
. asdf/asdf.sh
|
||||
asdf plugin-test java "$GITHUB_WORKSPACE" --asdf-plugin-gitref "$GITHUB_SHA" --asdf-tool-version zulu-8.52.0.23 /usr/libexec/java_home -V 2>&1 | grep "Zulu 8.52.0.23"
|
||||
if: matrix.os == 'macOS-latest'
|
||||
|
1
.github/workflows/update-data.yaml
vendored
1
.github/workflows/update-data.yaml
vendored
@ -5,6 +5,7 @@ on:
|
||||
- cron: '30 */8 * * *'
|
||||
jobs:
|
||||
update:
|
||||
if: github.repository == 'halcyon/asdf-java'
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -116,12 +116,17 @@ function install {
|
||||
mv ./* "${ASDF_INSTALL_PATH}"
|
||||
if [ "$(get_asdf_config_value "java_macos_integration_enable")" = "yes" ]; then
|
||||
local macOS_integration_path
|
||||
macOS_integration_path="$(dirname "$(dirname "$(dirname "$(absolute_dir_path "${ASDF_INSTALL_PATH}/release")")")")"
|
||||
macOS_integration_path="$(dirname "$(dirname "$(dirname "$(absolute_dir_path "${ASDF_INSTALL_PATH}/bin/..")")")")"
|
||||
java_macos_integration_install "$macOS_integration_path"
|
||||
fi
|
||||
;;
|
||||
liberica*) mv ./* "${ASDF_INSTALL_PATH}" ;;
|
||||
*)
|
||||
liberica*)
|
||||
mv ./* "${ASDF_INSTALL_PATH}"
|
||||
if [ "$(get_asdf_config_value "java_macos_integration_enable")" = "yes" ]; then
|
||||
echo "The ZIP packages of liberica do not contain the required files (Info.plist and the MacOS folder) to make /usr/libexec/java_home work correctly. You need the .pkg version to get those files."
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
mv Contents/Home/* "${ASDF_INSTALL_PATH}"
|
||||
if [ "$(get_asdf_config_value "java_macos_integration_enable")" = "yes" ]; then
|
||||
local macOS_integration_path
|
||||
|
Loading…
Reference in New Issue
Block a user