summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2025-04-13 13:47:05 +0200
committerSefa Eyeoglu <contact@scrumplex.net>2025-04-13 13:47:05 +0200
commit02f837ca1c02e602ed97e4ab49a97e84416a5fe3 (patch)
tree3c8e3264f69f4baa1cc055df1b406199b8cbc647 /meta
parentb95b59986cd81eb9e577a32cfbd48060026be0c2 (diff)
downloadProject-Tick-02f837ca1c02e602ed97e4ab49a97e84416a5fe3.tar.gz
Project-Tick-02f837ca1c02e602ed97e4ab49a97e84416a5fe3.zip
fix: allow NeoForge snapshots to be generated
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'meta')
-rw-r--r--meta/run/update_neoforge.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/meta/run/update_neoforge.py b/meta/run/update_neoforge.py
index 60b94ec6b1..25c316321f 100644
--- a/meta/run/update_neoforge.py
+++ b/meta/run/update_neoforge.py
@@ -144,7 +144,7 @@ def main():
r"^(?P<mc>[0-9a-zA-Z_\.]+)-(?P<ver>[0-9\.]+\.(?P<build>[0-9]+))(-(?P<branch>[a-zA-Z0-9\.]+))?$"
)
neoforge_version_re = re.compile(
- r"^(?P<mcminor>\d+).(?P<mcpatch>\d+).(?P<number>\d+)(?:-(?P<tag>\w+))?$"
+ r"^(?P<mcminor>\d+).(?:(?P<mcpatch>\d+)|(?P<snapshot>[0-9a-z]+)).(?P<number>\d+)(?:-(?P<tag>\w+))?$"
)
print("")
@@ -162,9 +162,11 @@ def main():
match_nf = neoforge_version_re.match(long_version)
if match_nf:
- mc_version = f"1.{match_nf.group('mcminor')}"
- if match_nf.group("mcpatch") != "0":
- mc_version += f".{match_nf.group('mcpatch')}"
+ mc_version = match_nf.group("snapshot")
+ if not mc_version:
+ mc_version = f"1.{match_nf.group('mcminor')}"
+ if match_nf.group("mcpatch") != "0":
+ mc_version += f".{match_nf.group('mcpatch')}"
build = int(match_nf.group("number"))
version = match_nf.group("number")
branch = match_nf.group("tag")