This commit is contained in:
Pilzinsel64
2025-12-09 09:20:01 +01:00
parent 08f55f2a99
commit f5ee557812
2 changed files with 5 additions and 5 deletions

View File

@@ -123,14 +123,14 @@ public class AppVersion(Version version, int build, AppChannel channel) : ICompa
{ {
versionStr = matchTPN.Groups["v"].Value; versionStr = matchTPN.Groups["v"].Value;
channelStr = matchTPN.Groups["c"].Value; channelStr = matchTPN.Groups["c"].Value;
buildStr = matchTPN.Groups["b"].Value; buildStr = matchTPN.Groups["n"].Value;
} }
// 1.14.2-beta.1 // 1.14.2-beta.1
else if (Regex.Match(input, @"(?<v>[0-9.]+)-(?<c>[a-zA-Z]+)(?<n>\d+)$") is { Success: true } matchTN) else if (Regex.Match(input, @"(?<v>[0-9.]+)-(?<c>[a-zA-Z]+)(?<n>\d+)$") is { Success: true } matchTN)
{ {
versionStr = matchTN.Groups["v"].Value; versionStr = matchTN.Groups["v"].Value;
channelStr = matchTN.Groups["c"].Value; channelStr = matchTN.Groups["c"].Value;
buildStr = matchTN.Groups["b"].Value; buildStr = matchTN.Groups["n"].Value;
} }
// 1.14.2-beta // 1.14.2-beta
else if (Regex.Match(input, @"(?<v>[0-9.]+)-(?<c>[a-zA-Z]+)$") is { Success: true } matchT) else if (Regex.Match(input, @"(?<v>[0-9.]+)-(?<c>[a-zA-Z]+)$") is { Success: true } matchT)
@@ -144,7 +144,7 @@ public class AppVersion(Version version, int build, AppChannel channel) : ICompa
{ {
versionStr = matchDN.Groups["v"].Value; versionStr = matchDN.Groups["v"].Value;
channelStr = matchDN.Groups["c"].Value; channelStr = matchDN.Groups["c"].Value;
buildStr = matchDN.Groups["b"].Value; buildStr = matchDN.Groups["n"].Value;
} }
// 1.14.2 Beta // 1.14.2 Beta
else if (Regex.Match(input, @"(?<v>[0-9.]+)-(?<c>[a-zA-Z]+)$") is { Success: true } matchD) else if (Regex.Match(input, @"(?<v>[0-9.]+)-(?<c>[a-zA-Z]+)$") is { Success: true } matchD)
@@ -169,7 +169,7 @@ public class AppVersion(Version version, int build, AppChannel channel) : ICompa
throw new FormatException("Bad version format: " + versionStr); throw new FormatException("Bad version format: " + versionStr);
// Parse channel // Parse channel
if (!Enum.TryParse(channelStr, out AppChannel channel)) if (!Enum.TryParse(channelStr, true, out AppChannel channel))
channel = AppChannel.Stable; channel = AppChannel.Stable;
// Parse build // Parse build

View File

@@ -5,7 +5,7 @@
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>annotations</Nullable> <Nullable>annotations</Nullable>
<Version>2.7.0</Version> <Version>2.7.1</Version>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">