diff options
author | Alexey 'Cluster' Avdyukhin <ClusterM@users.noreply.github.com> | 2017-12-09 18:09:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-09 18:09:56 +0300 |
commit | 29604df217a8dc9349b7a862c364c4b1a94b2844 (patch) | |
tree | e55da1dc1d293d702ae9cb02cbcd2861a322bae5 /hakchi_gui.csproj | |
parent | 3e8af5d45b2d1c0aa4fd9879283cb6b3d418dbac (diff) | |
parent | be0d7035ee248144600f180c5c9182b634ca1ce5 (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.csproj | 14 |
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. > 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"
+ SET ERRORLEVEL=0
+ ) || (
+ echo|set /p="%25%25i (dirty)" >> "$(ProjectDir)commit.txt"
+ )
+ )
+) || SET ERRORLEVEL=0</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>
|