@@ -869,19 +869,21 @@ public static string CleanVersionNumber(string version)
869
869
870
870
var split = version . Split ( '.' ) ;
871
871
float parsedVersion = float . Parse ( $ "{ split [ 0 ] } .{ split [ 1 ] } ") ;
872
- // 2023.3 and newer Alpha releases, no replace
873
- if ( IsAlpha ( version ) && parsedVersion >= 2023.3 )
872
+
873
+ // For 2023.3 and newer pre-release (alpha or beta) versions, do not clean.
874
+ if ( ( IsAlpha ( version ) || version . Contains ( "b" ) ) && parsedVersion >= 2023.3 )
874
875
{
875
- // do nothing
876
+ // Do nothing; leave version unchanged.
876
877
}
877
878
else
878
879
{
879
- // note old patch versions still contains p## in the end
880
- version = Regex . Replace ( version , @"[f|a|b ][0-9]{1,2}" , "" , RegexOptions . IgnoreCase ) ;
880
+ // Remove the trailing patch/build indicator.
881
+ version = Regex . Replace ( version , @"[fab ][0-9]{1,2}" , "" , RegexOptions . IgnoreCase ) ;
881
882
}
882
883
return version ;
883
884
}
884
885
886
+
885
887
// TODO only hash version is used, cleanup the rest
886
888
public static string ParseDownloadURLFromWebpage ( string version , string hash = null , bool preferFullInstaller = false , bool useHash = false )
887
889
{
0 commit comments