Show the git commit of the current build of BTCPay (#4320)

* Show the git commit of the current build of BTCPay

* Fix build

Co-authored-by: d11n <mail@dennisreimann.de>
This commit is contained in:
Nicolas Dorier
2022-11-22 21:37:07 +09:00
committed by GitHub
parent 9404819dbe
commit 9f3fca8fd7
7 changed files with 43 additions and 12 deletions

View File

@@ -0,0 +1,18 @@
using System;
namespace BTCPayServer
{
[AttributeUsage(AttributeTargets.Assembly, Inherited = false)]
public sealed class GitCommitAttribute : Attribute
{
public string SHA
{
get;
}
public string ShortSHA => SHA.Substring(0, 9);
public GitCommitAttribute(string sha)
{
SHA = sha;
}
}
}