Skip to content
Snippets Groups Projects
Commit 399e1e0d authored by Klaus Fischer's avatar Klaus Fischer
Browse files

Added test for comit id

parent 31c31d4f
No related branches found
No related tags found
1 merge request!29830 Version Header
......@@ -49,6 +49,9 @@
<EmbeddedResource Include="TrustedRootCertificates\PCA-1-Verwaltung-17.pem" />
<None Remove="Certificates\PCA-1-Verwaltung-20.pem" />
<EmbeddedResource Include="TrustedRootCertificates\PCA-1-Verwaltung-20.pem" />
<None Update="commitId.tmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
......@@ -63,4 +66,8 @@
<Compile Remove="Services\Models\v1\Api\ReplyChannel.cs" />
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="git rev-parse --short HEAD &gt; commitId.tmp" />
</Target>
</Project>
......@@ -18,7 +18,9 @@ internal static class ProjectSpecification {
private static string? GetCommitId() {
const string commitFileName = "commitId.tmp";
return File.Exists(commitFileName) ? File.ReadAllText(commitFileName) : null;
return File.Exists(commitFileName)
? File.ReadAllLines(commitFileName).First()
: "development";
}
public static byte[] CalculateCallbackHmac(string callbackSecret, long timestamp, string body) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment