fix: fix BuildInfo not being initialized

This commit is contained in:
sam 2024-06-04 17:43:48 +02:00
parent 588afeec20
commit 24155a149c
2 changed files with 7 additions and 0 deletions

View file

@ -29,4 +29,8 @@
<Exec Command="../build_info.sh" IgnoreExitCode="false"> <Exec Command="../build_info.sh" IgnoreExitCode="false">
</Exec> </Exec>
</Target> </Target>
<ItemGroup>
<EmbeddedResource Include="..\.version" LogicalName="version"/>
</ItemGroup>
</Project> </Project>

View file

@ -6,6 +6,9 @@ using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Serialization; using Newtonsoft.Json.Serialization;
// Read version information from .version in the repository root
await BuildInfo.ReadBuildInfo();
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
var config = builder.AddConfiguration(); var config = builder.AddConfiguration();