aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbootstrap.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/bootstrap.py b/bootstrap.py
index a35ddf6..1061f59 100755
--- a/bootstrap.py
+++ b/bootstrap.py
@@ -82,6 +82,11 @@ def build_test_pkg(pkg_name, branch, outdir):
tag_pattern = 'srcdata/%s/%s/release/*' % (pkg_name, branch)
git_cmd('checkout', ['srcdata/%s/%s' % (pkg_name, branch)])
+ # Check for hooks
+ hooks = {}
+ if os.path.exists('.bootstrap_hooks.py'):
+ LOG.info('Loading bootstrap hooks')
+ execfile('.bootstrap_hooks.py', hooks, hooks)
tags = git_cmd('tag', ['-l', tag_pattern], True)
for ind, tag in enumerate(tags):
builddir = tempfile.mkdtemp(dir='.',
@@ -95,6 +100,12 @@ def build_test_pkg(pkg_name, branch, outdir):
raise Exception('Building %s / %s failed! Builddata can be found '
'in %s' % (pkg_name, tag, builddir))
+ # Run postbuild_all hook
+ if 'postbuild' in hooks:
+ LOG.info('Running postbuild_all() hook for %s / %s' %
+ (pkg_name, tag))
+ hooks['postbuild'](builddir, tag, LOG)
+
# Create subdirs
orig_dir = '%s/%s' % (outdir, 'orig')
if not os.path.isdir(orig_dir):