mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Add diagnostic log for version comparison
This commit is contained in:
parent
5bdac105c2
commit
c7ab37edf1
@ -41,12 +41,26 @@ namespace Bloxstrap
|
|||||||
/// 1: version1 > version2
|
/// 1: version1 > version2
|
||||||
/// </returns>
|
/// </returns>
|
||||||
public static VersionComparison CompareVersions(string versionStr1, string versionStr2)
|
public static VersionComparison CompareVersions(string versionStr1, string versionStr2)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var version1 = new Version(versionStr1.Replace("v", ""));
|
var version1 = new Version(versionStr1.Replace("v", ""));
|
||||||
var version2 = new Version(versionStr2.Replace("v", ""));
|
var version2 = new Version(versionStr2.Replace("v", ""));
|
||||||
|
|
||||||
return (VersionComparison)version1.CompareTo(version2);
|
return (VersionComparison)version1.CompareTo(version2);
|
||||||
}
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
// temporary diagnostic log for the issue described here:
|
||||||
|
// https://github.com/bloxstraplabs/bloxstrap/issues/3193
|
||||||
|
// the problem is that this happens only on upgrade, so my only hope of catching this is bug reports following the next release
|
||||||
|
|
||||||
|
App.Logger.WriteLine("Utilities::CompareVersions", "An exception occurred when comparing versions");
|
||||||
|
App.Logger.WriteLine("Utilities::CompareVersions", $"versionStr1={versionStr1} versionStr2={versionStr2}");
|
||||||
|
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static string GetRobloxVersion(bool studio)
|
public static string GetRobloxVersion(bool studio)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user