24 lines
799 B
XML
24 lines
799 B
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<TargetFramework>net5.0</TargetFramework>
|
|
<RootNamespace>SharpChat</RootNamespace>
|
|
</PropertyGroup>
|
|
|
|
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
|
<!-- Write name of latest Git tag name to version.txt if non-debug build -->
|
|
<Exec Condition="'$(Configuration)'!='DEBUG'" Command="git describe --abbrev=0 --tags --always > version.txt" />
|
|
|
|
<!-- Write hash of latest commit to version.txt if debug build -->
|
|
<Exec Condition="'$(Configuration)'=='DEBUG'" Command="git log --pretty="%25%25H" -n1 HEAD > version.txt" />
|
|
</Target>
|
|
|
|
<ItemGroup>
|
|
<None Remove="version.txt" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<EmbeddedResource Include="version.txt" />
|
|
</ItemGroup>
|
|
|
|
</Project>
|