mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 12:23:39 +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/>
|
/// <inheritdoc/>
|
||||||
public IDalamudVersionInfo GetDalamudVersion()
|
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
|
#region IPC
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,20 @@
|
||||||
namespace Dalamud.Plugin.VersionInfo;
|
namespace Dalamud.Plugin.VersionInfo;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
internal class DalamudVersionInfo(Version version, string? track) : IDalamudVersionInfo
|
internal class DalamudVersionInfo(Version version, string? track, string? gitHash, string? gitHashClientStructs, string? scmVersion) : IDalamudVersionInfo
|
||||||
{
|
{
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public Version Version { get; } = version;
|
public Version Version { get; } = version;
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public string? BetaTrack { get; } = track;
|
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.
|
/// Null if this build wasn't launched from XIVLauncher.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string? BetaTrack { get; }
|
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