Skip to content

Commit

Permalink
plugin-development: Fix regex to properly handle Sponge builds target…
Browse files Browse the repository at this point in the history
…ing pre-release and RC minecraft versions
  • Loading branch information
zml2008 committed May 29, 2021
1 parent 11eb7af commit 4d6b279
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
public class SpongeVersioningMetadataRule implements ComponentMetadataRule {
// <mc version>-<API target>-<RC<BUILD> // development
// <mc version>-<API target> // stable
private static final Pattern SPONGE_IMPL_VERSION = Pattern.compile("(?<mc>[^-]+)-(?<api>[\\d.]+)(?:-RC(?<rc>\\d+))?");
private static final Pattern SPONGE_IMPL_VERSION = Pattern.compile("(?<mc>[\\d+.]+-(?:pre|rc)[\\d]+|[^-]+)-(?<api>[\\d.]+)(?:-RC(?<rc>\\d+))?");
private static final List<String> STATUS_SCHEME = Collections.unmodifiableList(Arrays.asList("rc", "release"));

public static final Attribute<String> MINECRAFT_TARGET = Attribute.of("org.spongepowered.minecraft-target", String.class);
Expand Down

0 comments on commit 4d6b279

Please sign in to comment.