Only get git hash when release build so debug build won't slow down but still checking for empty file in debug

This commit is contained in:
Jaex 2014-06-06 22:19:11 +03:00
parent d1316c1b56
commit f5e7aeb6f7
2 changed files with 9 additions and 5 deletions

View file

@ -523,10 +523,14 @@
<PropertyGroup>
<PreBuildEvent>cd $(ProjectDir)
for %25%25x in (git.exe) do if not [%25%25~$PATH:x]==[] (
git rev-parse HEAD &gt; GitHash.txt
) else (
type nul &gt; GitHash.txt
if $(ConfigurationName) == Release (
for %25%25x in (git.exe) do if not [%25%25~$PATH:x]==[] (
git rev-parse HEAD &gt; GitHash.txt
)
)
if not exist GitHash.txt (
type nul &gt; GitHash.txt
)</PreBuildEvent>
</PropertyGroup>
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />

View file

@ -432,7 +432,7 @@
<PreBuildEvent>cd $(ProjectDir)APIKeys\
if not exist APIKeysLocal.cs (
type nul &gt; APIKeysLocal.cs
type nul &gt; APIKeysLocal.cs
)</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.