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:
authorAlexey 'Cluster' Avdyukhin <ClusterM@users.noreply.github.com>2017-12-09 18:09:56 +0300
committerGitHub <noreply@github.com>2017-12-09 18:09:56 +0300
commit29604df217a8dc9349b7a862c364c4b1a94b2844 (patch)
treee55da1dc1d293d702ae9cb02cbcd2861a322bae5 /hakchi_gui.csproj
parent3e8af5d45b2d1c0aa4fd9879283cb6b3d418dbac (diff)
parentbe0d7035ee248144600f180c5c9182b634ca1ce5 (diff)
Merge pull request #849 from DanTheMan827/add-git-commit
Add git commit to log
Diffstat (limited to 'hakchi_gui.csproj')
-rw-r--r--hakchi_gui.csproj14
1 files changed, 12 insertions, 2 deletions
diff --git a/hakchi_gui.csproj b/hakchi_gui.csproj
index 611a019a..a20d7d8f 100644
--- a/hakchi_gui.csproj
+++ b/hakchi_gui.csproj
@@ -2486,8 +2486,18 @@
</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"
+ SET ERRORLEVEL=0
+ ) || (
+ echo|set /p="%25%25i (dirty)" &gt;&gt; "$(ProjectDir)commit.txt"
+ )
+ )
+) || SET ERRORLEVEL=0</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>