Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel <DanTheMan827>2017-10-17 18:20:27 +0300
committerDaniel <DanTheMan827>2017-10-17 18:22:10 +0300
commitf14691a591ecd88b0287b2be1a3c66bda32c1121 (patch)
treeef5ce04d556d3097888b0e9585e7b0ba115c0fb0 /hakchi_gui.csproj
parent88f3b50c9004d12a8603533bb94b22ee39da158b (diff)
Add git commit to log
Diffstat (limited to 'hakchi_gui.csproj')
-rw-r--r--hakchi_gui.csproj13
1 files changed, 11 insertions, 2 deletions
diff --git a/hakchi_gui.csproj b/hakchi_gui.csproj
index a1e10353..84dda3b4 100644
--- a/hakchi_gui.csproj
+++ b/hakchi_gui.csproj
@@ -2691,8 +2691,17 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
- <PreBuildEvent>
- </PreBuildEvent>
+ <PreBuildEvent>echo. &gt; NUL 2&gt; "$(ProjectDir)commit.txt"
+
+git --version &amp;&amp; (
+ for /f %25%25i in ('git rev-parse --short HEAD') do (
+ git diff-index --quiet HEAD -- &amp;&amp; (
+ echo|set /p="%25%25i" &gt;&gt; "$(ProjectDir)commit.txt"
+ ) || (
+ echo|set /p="%25%25i (dirty)" &gt;&gt; "$(ProjectDir)commit.txt"
+ )
+ )
+) || SET ERRORLEVEL=0</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>if exist languages rd /S /Q languages