Skip to content

Commit

Permalink
Trying to fix GitInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
qweasdd136963 committed Oct 4, 2018
1 parent 529684f commit c462859
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 11 deletions.
5 changes: 0 additions & 5 deletions src/xrCore/.GitInfo.cmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
where git >nul 2>nul
if %errorLevel% neq 0 (
goto :EOF
)

echo | set /p dummyName=#define GIT_INFO_CURRENT_COMMIT > .GitInfo.hpp
git rev-parse --verify HEAD >> .GitInfo.hpp

Expand Down
48 changes: 42 additions & 6 deletions src/xrCore/xrCore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,13 @@
<Message>Copying the required libraries ...</Message>
</PostBuildEvent>
<PreBuildEvent>
<Command>call .GitInfo.cmd</Command>
<Command>where /q git
if errorlevel 1 (
echo git is not founded
goto :EOF
)
echo git is founded
call .GitInfo.cmd</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
Expand All @@ -132,7 +138,13 @@
<Message>Copying the required libraries ...</Message>
</PostBuildEvent>
<PreBuildEvent>
<Command>call .GitInfo.cmd</Command>
<Command>where /q git
if errorlevel 1 (
echo git is not founded
goto :EOF
)
echo git is founded
call .GitInfo.cmd</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
Expand All @@ -151,7 +163,13 @@
<Message>Copying the required libraries ...</Message>
</PostBuildEvent>
<PreBuildEvent>
<Command>call .GitInfo.cmd</Command>
<Command>where /q git
if errorlevel 1 (
echo git is not founded
goto :EOF
)
echo git is founded
call .GitInfo.cmd</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
Expand All @@ -167,7 +185,13 @@
<Message>Copying the required libraries ...</Message>
</PostBuildEvent>
<PreBuildEvent>
<Command>call .GitInfo.cmd</Command>
<Command>where /q git
if errorlevel 1 (
echo git is not founded
goto :EOF
)
echo git is founded
call .GitInfo.cmd</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Mixed|Win32'">
Expand All @@ -185,7 +209,13 @@
<Message>Copying the required libraries ...</Message>
</PostBuildEvent>
<PreBuildEvent>
<Command>call .GitInfo.cmd</Command>
<Command>where /q git
if errorlevel 1 (
echo git is not founded
goto :EOF
)
echo git is founded
call .GitInfo.cmd</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Mixed|x64'">
Expand All @@ -201,7 +231,13 @@
<Message>Copying the required libraries ...</Message>
</PostBuildEvent>
<PreBuildEvent>
<Command>call .GitInfo.cmd</Command>
<Command>where /q git
if errorlevel 1 (
echo git is not founded
goto :EOF
)
echo git is founded
call .GitInfo.cmd</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down

0 comments on commit c462859

Please sign in to comment.