installer
installer copied to clipboard
pkgbuild GH action fails for latest Java 8 due to naming of package
GH action uses URL as follows:
- name: Download prebuilt binaries
run: |
mkdir -p workspace/target/
cd workspace/target/
wget -q "https://github.com/adoptium/temurin${{ env.MAJOR_VERSION }}-binaries/releases/download/${{ env.TAG }}/OpenJDK${{ env.MAJOR_VERSION }}U-jdk_${{ matrix.architecture }}_mac_hotspot_${{ env.SUB_TAG }}.tar.gz"
e.g. https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u422-b05.1/OpenJDK8U-jdk_x64_mac_hotspot_8u422b05.1.tar.gz
But the package we have built is at:
https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u422-b05.1/OpenJDK8U-jdk_x64_mac_hotspot_8u422b05.tar.gz
Note the missing .1 at the end of the file we have stored.
I think ${{ env.SUB_TAG }} needs to be enhanced or an extra ENV.
Maybe an extra dash-e in the jdk8 sed, like this?
# SUB_TAG is used to create the file name of the JDK/JRE zip file
release_name=$(echo "$json" | jq -r '.release_name')
if [[ "$major" -eq 8 ]]; then
subTag=$(echo "$release_name" | sed -e 's/jdk//' -e 's/-//' -e 's/\..*//')
else
subTag=$(echo "$release_name" | sed -e 's/jdk-//' -e 's/+/_/')
fi