diff options
author | Daniel <DanTheMan827> | 2017-10-17 18:20:27 +0300 |
---|---|---|
committer | Daniel <DanTheMan827> | 2017-10-17 18:22:10 +0300 |
commit | f14691a591ecd88b0287b2be1a3c66bda32c1121 (patch) | |
tree | ef5ce04d556d3097888b0e9585e7b0ba115c0fb0 /hakchi_gui.csproj | |
parent | 88f3b50c9004d12a8603533bb94b22ee39da158b (diff) |
Add git commit to log
Diffstat (limited to 'hakchi_gui.csproj')
-rw-r--r-- | hakchi_gui.csproj | 13 |
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. > NUL 2> "$(ProjectDir)commit.txt"
+
+git --version && (
+ for /f %25%25i in ('git rev-parse --short HEAD') do (
+ git diff-index --quiet HEAD -- && (
+ echo|set /p="%25%25i" >> "$(ProjectDir)commit.txt"
+ ) || (
+ echo|set /p="%25%25i (dirty)" >> "$(ProjectDir)commit.txt"
+ )
+ )
+) || SET ERRORLEVEL=0</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>if exist languages rd /S /Q languages
|