From 69e776a291872d0b20f5a55527b68ea09996b920 Mon Sep 17 00:00:00 2001 From: Guido Guenther Date: Thu, 21 Dec 2006 15:21:43 +0100 Subject: git-buildpackage: add an option (--git-cleaner) that allows to specify a different clean command (Closes: #403987) --- debian/changelog | 7 ++++--- docs/manpages/git-buildpackage.sgml | 7 +++++++ git-buildpackage | 4 +++- git_buildpackage/config.py | 10 ++++++---- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1ead3d9..280f333 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,12 @@ -git-buildpackage (0.2.19) experimental; urgency=low +git-buildpackage (0.2.19) unstable; urgency=low - * UNRELEASED + * git-buildpackage: add an option (--git-cleaner) that allows to specify + a different clean command (Closes: #403987) * depend on a git-core that has git-archive * s/keyid/GPG keyid/ * minor fixes all over the place - -- Guido Guenther Wed, 13 Dec 2006 22:39:42 +0100 + -- Guido Guenther Thu, 21 Dec 2006 15:18:40 +0100 git-buildpackage (0.2.18) experimental; urgency=low diff --git a/docs/manpages/git-buildpackage.sgml b/docs/manpages/git-buildpackage.sgml index bf473af..70c1dfd 100644 --- a/docs/manpages/git-buildpackage.sgml +++ b/docs/manpages/git-buildpackage.sgml @@ -30,6 +30,7 @@ + @@ -88,6 +89,12 @@ Use BUILD_CMD instead of debuild + + + + Use CLEAN_CMD instead of debuild clean + + diff --git a/git-buildpackage b/git-buildpackage index 95a9491..95d7216 100755 --- a/git-buildpackage +++ b/git-buildpackage @@ -63,6 +63,8 @@ def main(argv): help="verbose command execution") parser.add_config_file_option(option_name="builder", dest="build_cmd", help="command to build the package e.g. default is '%(builder)s'") + parser.add_config_file_option(option_name="cleaner", dest="clean_cmd", + help="command to build the package e.g. default is '%(cleaner)s'") parser.add_config_file_option(option_name="upstream-branch", dest="upstream_branch", help="upstream branch, default is '%(upstream-branch)s'") parser.add_config_file_option(option_name="debian-branch", dest='debian_branch', @@ -82,7 +84,7 @@ def main(argv): try: if not options.ignore_new: - Command(options.build_cmd, ['clean'])() + Command(options.clean_cmd)() (ret, out) = is_repository_clean('.') if not ret: print >>sys.stderr, "You have uncommitted changes in your source tree:" diff --git a/git_buildpackage/config.py b/git_buildpackage/config.py index e1fde15..cff4255 100644 --- a/git_buildpackage/config.py +++ b/git_buildpackage/config.py @@ -23,11 +23,12 @@ class GBPOptionParser(OptionParser): @type config_files: list """ defaults={ 'builder' : 'debuild', + 'cleaner' : 'debuild clean', 'debian-branch' : 'master', 'upstream-branch' : 'upstream', 'upstream-branch' : 'upstream', - 'sign-tags' : '', # empty means False - 'keyid' : '', + 'sign-tags' : '', # empty means False + 'keyid' : '', } config_files=['/etc/git-buildpackage/gbp.conf', os.path.expanduser('~/.gbp.conf'), @@ -59,6 +60,7 @@ class GBPOptionParser(OptionParser): @type help: string """ OptionParser.add_option(self,"--%s%s" % (self.prefix, option_name), dest=dest, - default=self.config[option_name], - help=help % self.config, **kwargs) + default=self.config[option_name], + help=help % self.config, **kwargs) +# vim:et:ts=4:sw=4: -- cgit v1.2.3