Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions bin/adoptopenjdk.bash
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AdoptOpenJDK went to become Eclipse Temurin, so maybe we also have to update bin/temurin.bash.

https://github.com/joschi/java-metadata/blob/c114d45e9866605f0c660045826c7ba495829499/bin/temurin.bash

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing, I've implemented the same changes in that script.

Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ function normalize_features {
then
features+=("large_heap")
fi
if [[ "${2}" == "alpine-linux" ]]
then
features+=("musl")
fi
echo "${features[@]}"
}

Expand All @@ -61,7 +65,7 @@ function download {
echo "Skipping non-JRE, non-JDK image ${filename}"
return 0
;;
esac
esac

local ext
# shellcheck disable=SC2016
Expand All @@ -88,6 +92,9 @@ function download {
return 0
fi

local os
os="$(jq -r '.os' <<< "${json}")"

local md_json
md_json="$(metadata_json \
"${VENDOR}" \
Expand All @@ -96,11 +103,11 @@ function download {
"${normalized_version}" \
"$(jq -r '.java_version' <<< "${json}")" \
"${jvm_impl}" \
"$(normalize_os "$(jq -r '.os' <<< "${json}")")" \
"$(normalize_os "$os")" \
"$(normalize_arch "$(jq -r '.architecture' <<< "${json}")")" \
"${ext}" \
"$(jq -r '.image_type' <<< "${json}")" \
"$(normalize_features "$(jq -r '.heap_size' <<< "${json}")")" \
"$(normalize_features "$(jq -r '.heap_size' <<< "${json}")" "$os")" \
"${url}" \
"$(hash_file 'md5' "${archive}" "${CHECKSUM_DIR}")" \
"$(hash_file 'sha1' "${archive}" "${CHECKSUM_DIR}")" \
Expand Down
13 changes: 10 additions & 3 deletions bin/temurin.bash
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ function normalize_features {
then
features+=("large_heap")
fi
if [[ "${2}" == "alpine-linux" ]]
then
features+=("musl")
fi
echo "${features[@]}"
}

Expand All @@ -61,7 +65,7 @@ function download {
echo "Skipping non-JRE, non-JDK image ${filename}"
return 0
;;
esac
esac

local ext
# shellcheck disable=SC2016
Expand All @@ -88,6 +92,9 @@ function download {
return 0
fi

local os
os="$(jq -r '.os' <<< "${json}")"

local md_json
md_json="$(metadata_json \
"${VENDOR}" \
Expand All @@ -96,11 +103,11 @@ function download {
"${normalized_version}" \
"$(jq -r '.java_version' <<< "${json}")" \
"${jvm_impl}" \
"$(normalize_os "$(jq -r '.os' <<< "${json}")")" \
"$(normalize_os "$os")" \
"$(normalize_arch "$(jq -r '.architecture' <<< "${json}")")" \
"${ext}" \
"$(jq -r '.image_type' <<< "${json}")" \
"$(normalize_features "$(jq -r '.heap_size' <<< "${json}")")" \
"$(normalize_features "$(jq -r '.heap_size' <<< "${json}")" "$os")" \
"${url}" \
"$(hash_file 'md5' "${archive}" "${CHECKSUM_DIR}")" \
"$(hash_file 'sha1' "${archive}" "${CHECKSUM_DIR}")" \
Expand Down