Add a post-merge githook to invalidate the local module manifest.

The Builder module manifest is generated once from the local tree if its missing.
When new code is merged from a remote the manifest must be regenerated in order to
reference and build the new libraries.

At setup time a post-merge hook is now added to the local repository to clear the
module manifest after merging.
This commit is contained in:
Jeffrey Townsend
2016-04-11 17:14:57 +00:00
parent c504085d5a
commit 67c67470d2
2 changed files with 20 additions and 0 deletions

View File

@@ -39,3 +39,8 @@ $ONL/tools/submodules.py $ONL sm/bigcode
# Export the current debian suite
export ONL_DEBIAN_SUITE=$(lsb_release -c -s)
# Enable local post-merge githook
if [ ! -f $ONL/.git/hooks/post-merge ]; then
cp $ONL/tools/scripts/post-merge.hook $ONL/.git/hooks/post-merge
fi

15
tools/scripts/post-merge.hook Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
############################################################
#
# Every time a merge is performed we should invalidate
# the module manifest.
#
############################################################
mm="$GIT_DIR/../make/module-manifest.mk"
if [ -f "$mm" ]; then
echo "Removing module manifest after merge..."
rm "$mm"
fi