aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-07-06 03:22:51 -0500
committerGuido Günther <agx@sigxcpu.org>2010-07-06 17:40:59 +0200
commita650ce3f8be383561fa16039723d75c154574d28 (patch)
tree2eac7ace712641032f00f9ed590acc914509b644 /gbp
parent2acfc8fa4620a214822598849f01cb3fd31320cc (diff)
Add prebuild hook
Can be used to add an upstream changelog generated from the git repository to the build dir. Closes: #587652
Diffstat (limited to 'gbp')
-rw-r--r--gbp/config.py1
-rw-r--r--gbp/git.py4
2 files changed, 5 insertions, 0 deletions
diff --git a/gbp/config.py b/gbp/config.py
index 7c932007..a0ca547a 100644
--- a/gbp/config.py
+++ b/gbp/config.py
@@ -37,6 +37,7 @@ class GbpOptionParser(OptionParser):
'keyid' : '',
'posttag' : '',
'postbuild' : '',
+ 'prebuild' : '',
'postimport' : '',
'debian-tag' : 'debian/%(version)s',
'upstream-tag' : 'upstream/%(version)s',
diff --git a/gbp/git.py b/gbp/git.py
index 8546a833..c09ce1ea 100644
--- a/gbp/git.py
+++ b/gbp/git.py
@@ -62,6 +62,10 @@ class GitRepository(object):
stdin = None
return stdin
+ def base_dir(self):
+ """Base of the repository"""
+ return os.path.join(self.path, '.git')
+
def has_branch(self, branch, remote=False):
"""
check if the repository has branch 'branch'