Files
CustomizeTool/CustomizePlus/Core/Helpers/VersionHelper.cs
2024-11-16 03:55:21 +03:00

31 lines
801 B
C#

#if !DEBUG
using System.Reflection;
#endif
namespace CustomizePlus.Core.Helpers;
internal static class VersionHelper
{
public static string Version { get; private set; } = "Initializing";
public static bool IsTesting { get; private set; } = false;
public static bool IsDebug { get; private set; } = false;
static VersionHelper()
{
#if DEBUG
Version = $"{ThisAssembly.Git.Commit}+{ThisAssembly.Git.Sha} [DEBUG]";
IsDebug = true;
#else
Version = Assembly.GetExecutingAssembly().GetName().Version?.ToString() ?? string.Empty;
#endif
if (ThisAssembly.Git.BaseTag.ToLowerInvariant().Contains("testing"))
IsTesting = true;
if (IsTesting)
Version += " [TESTING BUILD]";
}
}