Skip to content

Commit 32cdcf2

Browse files
authored
add 26+ support for VersionWeight (#200)
1 parent 30b8f4a commit 32cdcf2

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/main/java/studio/magemonkey/genesis/Genesis.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,12 @@ public static long getVersionWeight() {
230230
long weight = getVersionWeight(versionPart);
231231

232232
if (weight == 0) {
233+
// In case '-' is not found, we might assume that newer version use '.' and need to be split on 26.1.2'.build'.2592-stable
234+
parts = version.split(".build");
235+
versionPart = parts[0];
236+
weight = getVersionWeight(versionPart);
237+
if(weight != 0)
238+
return weight;
233239
throw new IllegalArgumentException("Invalid version format: " + version);
234240
}
235241

0 commit comments

Comments
 (0)