File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ function rocky_latest_image_entry_for_url_spec() {
115115 # Rocky 10 requires explicit minor version paths (e.g., 10.1) as the major version path (10) is unreliable.
116116 local major_version latest_minor
117117 major_version=$( jq -r ' .major_version' <<< " ${url_spec}" )
118- latest_minor=$( curl -s " https://dl.rockylinux.org/pub/rocky/" | grep -oP " (?<= href=[\" ']) ${major_version} \.[0-9]+(?=/ [\" ']) " | sort -V | tail -1)
118+ latest_minor=$( curl -s " https://dl.rockylinux.org/pub/rocky/" | grep -oE " href=[\" ']${major_version} \.[0-9]+/ " | sed -E " s/href= [\" ']//;s/\/// " | sort -V | tail -1)
119119 # Use the discovered minor version, falling back to the major version if discovery fails
120120 major_version_url_spec=$( jq -e -r --arg v " ${latest_minor:- $major_version } " ' .path_version = $v' <<< " ${url_spec}" )
121121 major_version_image_directory=$( rocky_image_directory_from_url_spec " ${major_version_url_spec} " )
You can’t perform that action at this time.
0 commit comments