From 4c5ac0094f7b2a4060c59569ff178ca349d8a8ba Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Wed, 2 Aug 2023 15:30:35 +0200 Subject: [PATCH 1/2] minecraft-server: fix update script Fixes 1.7.9 being newer than 1.7.10 --- pkgs/games/minecraft-servers/update.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/games/minecraft-servers/update.py b/pkgs/games/minecraft-servers/update.py index 0e7f10a8c932..f272c8b71a84 100755 --- a/pkgs/games/minecraft-servers/update.py +++ b/pkgs/games/minecraft-servers/update.py @@ -117,8 +117,11 @@ def get_latest_major_releases(releases: List[Version]) -> Dict[str, Version]: Version object for 1.16.5. """ return { - major_release: sorted(releases, key=lambda x: x.id, reverse=True)[0] - for major_release, releases in group_major_releases(releases).items() + major_release: max( + (release for release in releases if get_major_release(release.id) == major_release), + key=lambda x: tuple(map(int, x.id.split('.'))), + ) + for major_release in group_major_releases(releases) } From 0f47d4b51c415f8c5993ce0c0e71b9942a582e23 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Wed, 2 Aug 2023 15:31:56 +0200 Subject: [PATCH 2/2] minecraft-server: 1.20 -> 1.20.1, 1.7.9 -> 1.7.10 --- pkgs/games/minecraft-servers/versions.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/games/minecraft-servers/versions.json b/pkgs/games/minecraft-servers/versions.json index 8c751bf70074..142ef4e51c5d 100644 --- a/pkgs/games/minecraft-servers/versions.json +++ b/pkgs/games/minecraft-servers/versions.json @@ -1,8 +1,8 @@ { "1.20": { - "url": "https://piston-data.mojang.com/v1/objects/15c777e2cfe0556eef19aab534b186c0c6f277e1/server.jar", - "sha1": "15c777e2cfe0556eef19aab534b186c0c6f277e1", - "version": "1.20", + "url": "https://piston-data.mojang.com/v1/objects/84194a2f286ef7c14ed7ce0090dba59902951553/server.jar", + "sha1": "84194a2f286ef7c14ed7ce0090dba59902951553", + "version": "1.20.1", "javaVersion": 17 }, "1.19": { @@ -78,9 +78,9 @@ "javaVersion": 8 }, "1.7": { - "url": "https://launcher.mojang.com/v1/objects/4cec86a928ec171fdc0c6b40de2de102f21601b5/server.jar", - "sha1": "4cec86a928ec171fdc0c6b40de2de102f21601b5", - "version": "1.7.9", + "url": "https://launcher.mojang.com/v1/objects/952438ac4e01b4d115c5fc38f891710c4941df29/server.jar", + "sha1": "952438ac4e01b4d115c5fc38f891710c4941df29", + "version": "1.7.10", "javaVersion": 8 }, "1.6": {