Skip to content

Commit

Permalink
Atttempt to reduce calls to git
Browse files Browse the repository at this point in the history
  • Loading branch information
sandermvanvliet committed Feb 20, 2024
1 parent 200cbd9 commit b769e79
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project>
<Target Name="DetermineInformationalVersion" BeforeTargets="BeforeBuild">
<Target Name="DetermineInformationalVersion" BeforeTargets="BeforeBuild" Condition="'$(GitSha)'==''">
<Exec Command="git rev-parse --short HEAD"
ConsoleToMSBuild="True"
EchoOff="True"
IgnoreExitCode="True">
IgnoreExitCode="True"
Condition="'$(GitSha)'==''">
<Output TaskParameter="ConsoleOutput" PropertyName="GitSha" />
</Exec>
<PropertyGroup>
Expand Down

0 comments on commit b769e79

Please sign in to comment.