Git version wird richtig geparsed
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -18,3 +18,4 @@ project.fragment.lock.json
|
|||||||
*.tmp
|
*.tmp
|
||||||
/DaSaSo.InMemoryProvider/obj/Debug/*
|
/DaSaSo.InMemoryProvider/obj/Debug/*
|
||||||
/DaSaSo.ViewModel/version.txt
|
/DaSaSo.ViewModel/version.txt
|
||||||
|
/DaSaSo.Wpf/version.txt
|
||||||
|
|||||||
@@ -7,6 +7,16 @@
|
|||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Remove="version.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="version.txt">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
@@ -28,4 +38,8 @@
|
|||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
||||||
|
<Exec Command="git rev-parse HEAD > $(ProjectDir)\version.txt" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ namespace DaSaSo.Wpf.ViewModel
|
|||||||
{
|
{
|
||||||
string gitVersion;
|
string gitVersion;
|
||||||
#pragma warning disable CS8600 // Converting null literal or possible null value to non-nullable type.
|
#pragma warning disable CS8600 // Converting null literal or possible null value to non-nullable type.
|
||||||
using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("DaSaSo.ViewModel.version.txt"))
|
using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("DaSaSo.Wpf.version.txt"))
|
||||||
#pragma warning restore CS8600 // Converting null literal or possible null value to non-nullable type.
|
#pragma warning restore CS8600 // Converting null literal or possible null value to non-nullable type.
|
||||||
#pragma warning disable CS8604 // Possible null reference argument.
|
#pragma warning disable CS8604 // Possible null reference argument.
|
||||||
using (StreamReader reader = new(stream))
|
using (StreamReader reader = new(stream))
|
||||||
|
|||||||
Reference in New Issue
Block a user