From 67c67470d2fd8d013b16497867230e588a4cda67 Mon Sep 17 00:00:00 2001 From: Jeffrey Townsend Date: Mon, 11 Apr 2016 17:14:57 +0000 Subject: [PATCH] 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. --- setup.env | 5 +++++ tools/scripts/post-merge.hook | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100755 tools/scripts/post-merge.hook diff --git a/setup.env b/setup.env index 57c6aa21..6418a522 100755 --- a/setup.env +++ b/setup.env @@ -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 diff --git a/tools/scripts/post-merge.hook b/tools/scripts/post-merge.hook new file mode 100755 index 00000000..e4bad577 --- /dev/null +++ b/tools/scripts/post-merge.hook @@ -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 + +