Commit a18299c9 by Jamie Madill

Reference .git/index as a dependency of commit_id.

Any time the git index changes, we will re-run the commit id hook. This will ensure we never are left with stale commit ids from other git commits. BUG=angle:626 Change-Id: I03c37225fb902b6c1801e8f993d767122e8bfeb6 Reviewed-on: https://chromium-review.googlesource.com/197723Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 25bf006a
...@@ -101,6 +101,9 @@ ...@@ -101,6 +101,9 @@
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<None Include="..\..\src\angle.gyp"/> <None Include="..\..\src\angle.gyp"/>
<None Include="..\..\.git\index">
<ExcludedFromBuild>true</ExcludedFromBuild>
</None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<CustomBuild Include="$(OutDir)obj\global_intermediate\commit_id.bat"> <CustomBuild Include="$(OutDir)obj\global_intermediate\commit_id.bat">
...@@ -108,6 +111,7 @@ ...@@ -108,6 +111,7 @@
<Command>call call $(OutDir)obj\global_intermediate\commit_id.bat &quot;$(OutDir)obj\global_intermediate&quot;</Command> <Command>call call $(OutDir)obj\global_intermediate\commit_id.bat &quot;$(OutDir)obj\global_intermediate&quot;</Command>
<Message>Generating commit ID header...</Message> <Message>Generating commit ID header...</Message>
<Outputs>$(OutDir)obj\global_intermediate\commit.h</Outputs> <Outputs>$(OutDir)obj\global_intermediate\commit.h</Outputs>
<AdditionalInputs>..\..\.git\index</AdditionalInputs>
</CustomBuild> </CustomBuild>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
......
...@@ -19,6 +19,12 @@ ...@@ -19,6 +19,12 @@
<Filter Include="..\..\src"> <Filter Include="..\..\src">
<UniqueIdentifier>{8CDEE807-BC53-E450-C8B8-4DEBB66742D4}</UniqueIdentifier> <UniqueIdentifier>{8CDEE807-BC53-E450-C8B8-4DEBB66742D4}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="..\..\.git">
<UniqueIdentifier>{3C74FDB1-3FB1-8FA9-1073-A344751C6694}</UniqueIdentifier>
</Filter>
<Filter Include="..\..\.git\_excluded_files">
<UniqueIdentifier>{158E591E-B6EA-0C85-8F5A-18EAFA09B4CE}</UniqueIdentifier>
</Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="$(OutDir)obj\global_intermediate\commit_id.bat"> <None Include="$(OutDir)obj\global_intermediate\commit_id.bat">
...@@ -27,5 +33,8 @@ ...@@ -27,5 +33,8 @@
<None Include="..\..\src\angle.gyp"> <None Include="..\..\src\angle.gyp">
<Filter>..\..\src</Filter> <Filter>..\..\src</Filter>
</None> </None>
<None Include="..\..\.git\index">
<Filter>..\..\.git\_excluded_files</Filter>
</None>
</ItemGroup> </ItemGroup>
</Project> </Project>
...@@ -43,19 +43,19 @@ ...@@ -43,19 +43,19 @@
'action_name': 'Generate Commit ID Header', 'action_name': 'Generate Commit ID Header',
'message': 'Generating commit ID header...', 'message': 'Generating commit ID header...',
'msvs_cygwin_shell': 0, 'msvs_cygwin_shell': 0,
'inputs': [ '<(SHARED_INTERMEDIATE_DIR)/commit_id.bat' ], 'inputs': [ '<(SHARED_INTERMEDIATE_DIR)/commit_id.bat', '<(angle_path)/.git/index' ],
'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/commit.h' ], 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/commit.h' ],
'action': [ '<(SHARED_INTERMEDIATE_DIR)/commit_id.bat', '<(SHARED_INTERMEDIATE_DIR)' ], 'action': [ '<(SHARED_INTERMEDIATE_DIR)/commit_id.bat', '<(SHARED_INTERMEDIATE_DIR)' ],
}, },
], ],
}, },
{ { # OS != win
'actions': 'actions':
[ [
{ {
'action_name': 'Generate Commit ID Header', 'action_name': 'Generate Commit ID Header',
'message': 'Generating commit ID header...', 'message': 'Generating commit ID header...',
'inputs': [ '<(SHARED_INTERMEDIATE_DIR)/commit_id.py' ], 'inputs': [ '<(SHARED_INTERMEDIATE_DIR)/commit_id.py', '<(angle_path)/.git/index' ],
'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/commit.h' ], 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/commit.h' ],
'action': [ 'python', '<(SHARED_INTERMEDIATE_DIR)/commit_id.py', '<(SHARED_INTERMEDIATE_DIR)/commit.h' ], 'action': [ 'python', '<(SHARED_INTERMEDIATE_DIR)/commit_id.py', '<(SHARED_INTERMEDIATE_DIR)/commit.h' ],
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment