mirror of
https://github.com/MSWS/TTT.git
synced 2025-12-06 06:22:44 -08:00
Add condition to GenerateGitVersionInformation target in Versioning.csproj - Prevent execution in continuous integration environments by adding a condition to the GenerateGitVersionInformation target in Versioning.csproj.
13 lines
485 B
XML
13 lines
485 B
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<OutputType>Exe</OutputType>
|
|
<TargetFramework>net8.0</TargetFramework>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<Nullable>enable</Nullable>
|
|
</PropertyGroup>
|
|
|
|
<Target Name="GenerateGitVersionInformation" BeforeTargets="BeforeCompile" Condition="'$(OS)' != 'Windows_NT' And '$(CI)' != 'true'">
|
|
<Exec Command="dotnet-gitversion '$(ProjectDir)' > '$(ProjectDir)/../gitversion.json'"/>
|
|
</Target>
|
|
</Project> |