Testing version warning
This commit is contained in:
27
CustomizePlus/Core/Helpers/VersionHelper.cs
Normal file
27
CustomizePlus/Core/Helpers/VersionHelper.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
#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;
|
||||
|
||||
static VersionHelper()
|
||||
{
|
||||
#if DEBUG
|
||||
Version = $"{ThisAssembly.Git.Commit}+{ThisAssembly.Git.Sha} [DEBUG]";
|
||||
#else
|
||||
Version = Assembly.GetExecutingAssembly().GetName().Version?.ToString() ?? string.Empty;
|
||||
#endif
|
||||
|
||||
if (ThisAssembly.Git.BaseTag.ToLowerInvariant().Contains("testing"))
|
||||
IsTesting = true;
|
||||
|
||||
if (IsTesting)
|
||||
Version += " [TESTING BUILD]";
|
||||
}
|
||||
}
|
||||
@@ -219,6 +219,7 @@ public class CommandService : IDisposable
|
||||
{
|
||||
if (state != null)
|
||||
{
|
||||
//todo: still check and disable other profiles in this case?
|
||||
if (targetProfile!.Enabled == state)
|
||||
{
|
||||
_chatService.PrintInChat(new SeStringBuilder()
|
||||
|
||||
@@ -5,6 +5,7 @@ using CustomizePlus.Armatures.Services;
|
||||
using CustomizePlus.Configuration.Data;
|
||||
using CustomizePlus.Core.Data;
|
||||
using CustomizePlus.Core.Extensions;
|
||||
using CustomizePlus.Core.Helpers;
|
||||
using CustomizePlus.Profiles;
|
||||
using CustomizePlus.Templates;
|
||||
using Dalamud.Plugin;
|
||||
@@ -38,7 +39,7 @@ public class SupportLogBuilderService
|
||||
{
|
||||
var sb = new StringBuilder(102400); //it's fair to assume this will very often be quite large
|
||||
sb.AppendLine("**Settings**");
|
||||
sb.Append($"> **`Plugin Version: `** {Plugin.Version}\n");
|
||||
sb.Append($"> **`Plugin Version: `** {VersionHelper.Version}\n");
|
||||
sb.Append($"> **`Commit Hash: `** {ThisAssembly.Git.Commit}+{ThisAssembly.Git.Sha}\n");
|
||||
sb.Append($"> **`Plugin enabled: `** {_configuration.PluginEnabled}\n");
|
||||
sb.AppendLine("**Settings -> Editor Settings**");
|
||||
|
||||
Reference in New Issue
Block a user