installer icon indicating copy to clipboard operation
installer copied to clipboard

pkgbuild GH action fails for latest Java 8 due to naming of package

Open karianna opened this issue 1 year ago • 1 comments

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. added to the end for the .1 patch number

karianna avatar Aug 05 '24 17:08 karianna

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

adamfarley avatar Oct 09 '24 23:10 adamfarley