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

Update commitId persistance

parent 399e1e0d
No related branches found
No related tags found
1 merge request!29830 Version Header
......@@ -39,7 +39,7 @@ public static class JsonHelper {
}
private static string LoadContentOfResource(string resourceName) {
internal static string LoadContentOfResource(string resourceName) {
var assembly = Assembly.GetExecutingAssembly();
var fullQualifiedName = $"{assembly.GetName().Name}.{resourceName}";
var resourceStream = assembly.GetManifestResourceStream(fullQualifiedName);
......
......@@ -49,9 +49,10 @@
<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">
<None Remove="commitId.tmp" />
<EmbeddedResource Include="commitId.tmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
......
using System.Security.Cryptography;
using System.Text;
using FitConnect.Encryption;
namespace FitConnect;
......@@ -17,10 +18,7 @@ internal static class ProjectSpecification {
private static string? GetCommitId() {
const string commitFileName = "commitId.tmp";
return File.Exists(commitFileName)
? File.ReadAllLines(commitFileName).First()
: "development";
return JsonHelper.LoadContentOfResource("commitId.tmp").Trim();
}
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