diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2010-07-06 03:22:51 -0500 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2010-07-06 17:40:59 +0200 |
commit | a650ce3f8be383561fa16039723d75c154574d28 (patch) | |
tree | 2eac7ace712641032f00f9ed590acc914509b644 /git-buildpackage | |
parent | 2acfc8fa4620a214822598849f01cb3fd31320cc (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 'git-buildpackage')
-rwxr-xr-x | git-buildpackage | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/git-buildpackage b/git-buildpackage index dba20a93..e4e5a6c6 100755 --- a/git-buildpackage +++ b/git-buildpackage @@ -258,6 +258,8 @@ def main(argv): help="command to build the Debian package, default is '%(builder)s'") cmd_group.add_config_file_option(option_name="cleaner", dest="cleaner", help="command to clean the working copy, default is '%(cleaner)s'") + cmd_group.add_config_file_option(option_name="prebuild", dest="prebuild", + help="command to run before a build, default is '%(prebuild)s'") cmd_group.add_config_file_option(option_name="postbuild", dest="postbuild", help="hook run after a successful build, default is '%(postbuild)s'") cmd_group.add_config_file_option(option_name="posttag", dest="posttag", @@ -376,6 +378,11 @@ def main(argv): else: build_dir = repo_dir + if options.prebuild: + RunAtCommand(options.prebuild, shell=True, + extra_env={'GBP_GIT_DIR': repo.base_dir(), + 'GBP_BUILD_DIR': build_dir})(dir=build_dir) + # Finally build the package: RunAtCommand(options.builder, dpkg_args, shell=True, extra_env={'GBP_BUILD_DIR': build_dir})(dir=build_dir) |