mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 04:13:40 +01:00
Add git hash/scm version properties to DalamudVersionInfo
This commit is contained in:
parent
77b6d71855
commit
bd87a3d251
3 changed files with 29 additions and 2 deletions
|
|
@ -220,7 +220,7 @@ internal sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposa
|
|||
/// <inheritdoc/>
|
||||
public IDalamudVersionInfo GetDalamudVersion()
|
||||
{
|
||||
return new DalamudVersionInfo(Versioning.GetAssemblyVersionParsed(), Versioning.GetActiveTrack());
|
||||
return new DalamudVersionInfo(Versioning.GetAssemblyVersionParsed(), Versioning.GetActiveTrack(), Versioning.GetGitHash(), Versioning.GetGitHashClientStructs(), Versioning.GetScmVersion());
|
||||
}
|
||||
|
||||
#region IPC
|
||||
|
|
|
|||
|
|
@ -1,11 +1,20 @@
|
|||
namespace Dalamud.Plugin.VersionInfo;
|
||||
|
||||
/// <inheritdoc />
|
||||
internal class DalamudVersionInfo(Version version, string? track) : IDalamudVersionInfo
|
||||
internal class DalamudVersionInfo(Version version, string? track, string? gitHash, string? gitHashClientStructs, string? scmVersion) : IDalamudVersionInfo
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public Version Version { get; } = version;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string? BetaTrack { get; } = track;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string? GitHash { get; } = gitHash;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string? GitHashClientStructs { get; } = gitHashClientStructs;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string? ScmVersion { get; } = scmVersion;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,4 +16,22 @@ public interface IDalamudVersionInfo
|
|||
/// Null if this build wasn't launched from XIVLauncher.
|
||||
/// </summary>
|
||||
string? BetaTrack { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the git commit hash value from the assembly or null if it cannot be found. Will be null for Debug builds,
|
||||
/// and will be suffixed with `-dirty` if in release with pending changes.
|
||||
/// </summary>
|
||||
string? GitHash { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the git hash value from the assembly or null if it cannot be found.
|
||||
/// </summary>
|
||||
string? GitHashClientStructs { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the SCM Version from the assembly, or null if it cannot be found. The value returned will generally be
|
||||
/// the <c>git describe</c> output for this build, which will be a raw version if this is a stable build or an
|
||||
/// appropriately-annotated version if this is *not* stable. Local builds will return a `Local Build` text string.
|
||||
/// </summary>
|
||||
string? ScmVersion { get; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue