Skip to content

Conversation

@andrecloutier
Copy link
Contributor

@andrecloutier andrecloutier commented Oct 24, 2025

Fixes: #89

Looks like despite the previous improvement to remove the zre build links, they've somehow made their way back in. This PR improves the grep expression to expect a number following "zulu" in order to avoid the zre or other potentially malformed names.

Before:

root@andrecloutier:~# grep -o -E '<a href=".*/(zulu.+-(linux|macosx|win|solaris)_(musl_x64|musl_aarch64|x64|i686|aarch32hf|aarch32sf|aarch64|ppc64|sparcv9)\.(tar\.gz|zip|msi|dmg))">' "${INDEX_FILE}" | perl -pe 's#<a href=".*/(zulu[^/]+)">#$1#g' | head
<a href="/zulu/bin/zre9.0.0.15-jre9.0.0-macosx_x64.dmg">
<a href="/zulu/bin/zre9.0.0.15-jre9.0.0-macosx_x64.tar.gz">
<a href="/zulu/bin/zre9.0.0.15-jre9.0.0-macosx_x64.zip">
<a href="/zulu/bin/zre9.0.0.15-jre9.0.0-win_x64.msi">
zulu10.1+11-jdk10-linux_i686.zip
zulu10.1+11-jdk10-linux_x64.tar.gz
zulu10.1+11-jdk10-macosx_x64.dmg
zulu10.1+11-jdk10-macosx_x64.tar.gz
zulu10.1+11-jdk10-macosx_x64.zip
zulu10.1+11-jdk10-win_i686.zip

root@andrecloutier:~# grep -o -E '<a href=".*/(zulu.+-(linux|macosx|win|solaris)_(musl_x64|musl_aarch64|x64|i686|aarch32hf|aarch32sf|aarch64|ppc64|sparcv9)\.(tar\.gz|zip|msi|dmg))">' "${INDEX_FILE}" | perl -pe 's#<a href=".*/(zulu[^/]+)">#$1#g' | wc -l
10494

After:

root@andrecloutier:~# grep -o -E '<a href=".*/(zulu[0-9]+.+-(linux|macosx|win|solaris)_(musl_x64|musl_aarch64|x64|i686|aarch32hf|aarch32sf|aarch64|ppc64|sparcv9)\.(tar\.gz|zip|msi|dmg))">' "${INDEX_FILE}" | perl -pe 's#<a href=".*/(zulu[^/]+)">#$1#g' | head
zulu10.1+11-jdk10-linux_i686.zip
zulu10.1+11-jdk10-linux_x64.tar.gz
zulu10.1+11-jdk10-macosx_x64.dmg
zulu10.1+11-jdk10-macosx_x64.tar.gz
zulu10.1+11-jdk10-macosx_x64.zip
zulu10.1+11-jdk10-win_i686.zip
zulu10.1+11-jdk10-win_x64.msi
zulu10.1+11-jdk10-win_x64.zip
zulu10.1+11-jdk10.0.0-linux_i686.zip
zulu10.1+11-jdk10.0.0-linux_x64.tar.gz

root@andrecloutier:~# grep -o -E '<a href=".*/(zulu[0-9]+.+-(linux|macosx|win|solaris)_(musl_x64|musl_aarch64|x64|i686|aarch32hf|aarch32sf|aarch64|ppc64|sparcv9)\.(tar\.gz|zip|msi|dmg))">' "${INDEX_FILE}" | perl -pe 's#<a href=".*/(zulu[^/]+)">#$1#g' | wc -l
10490

@andrecloutier andrecloutier changed the title Improve regex to ignore ZRE links Improve regex to ignore ZRE links for Azul Oct 24, 2025
@andrecloutier andrecloutier changed the title Improve regex to ignore ZRE links for Azul Improve regex to ignore ZRE links for Zulu Oct 24, 2025
@andrecloutier andrecloutier changed the title Improve regex to ignore ZRE links for Zulu fix: improve zulu regex to ignore zre links Oct 24, 2025
@joschi joschi added the bug Something isn't working label Oct 24, 2025
@joschi
Copy link
Owner

joschi commented Oct 24, 2025

@andrecloutier Thanks for fixing this bug!

@joschi joschi merged commit 833675f into joschi:main Oct 24, 2025
1 check passed
@andrecloutier andrecloutier deleted the patch-1 branch October 30, 2025 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zulu update is failing

2 participants