Added known java tags for fast lookup

This commit is contained in:
Michael Chen 2022-11-22 14:10:08 +01:00
parent f8db6b8a23
commit c5c10dbeef
Signed by: cnml
GPG Key ID: 5845BF3F82D5F629

View File

@ -97,6 +97,16 @@ def get_version_by_description(modpack: ModPackManifest, version_name: str | Non
pass
def find_suitable_tag(java_repository: str, java_version: str, ver_to_tag: Callable[[str], str] = lambda x: f"{x}-jre"):
known_version = {
"17.0.4_8": "17.0.4_8-jre",
"17.0.2_8": "17.0.2_8-jre",
"8.0.312_7": "8-jre",
"8.0.302_8": "8-jre",
}.get(java_version, None)
if known_version is not None:
print(f"Using known version {java_version} -> {known_version}")
return known_version
java_tag_version = java_version
while True:
# base_image = f"azul/zulu-openjdk:{java_version}-jre"