diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2012-06-25 11:04:17 +0300 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2012-06-25 15:20:39 +0300 |
commit | aafdb4d060c0dfb4101753703fa4b969a5044590 (patch) | |
tree | 092ee3dc735d058a7fb68f44d6fe389a4dadf33a /gbp/scripts | |
parent | 5de0692fcfb0c63a295fb455736d5add610c482f (diff) | |
download | git-buildpackage-aafdb4d060c0dfb4101753703fa4b969a5044590.tar.gz git-buildpackage-aafdb4d060c0dfb4101753703fa4b969a5044590.tar.bz2 git-buildpackage-aafdb4d060c0dfb4101753703fa4b969a5044590.zip |
buildpackage-rpm: allow building when not on any branch
Allows running git-buildpackage even if not on any git branch, e.g. when
just checked out a tag a want to build that.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp/scripts')
-rwxr-xr-x | gbp/scripts/buildpackage_rpm.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gbp/scripts/buildpackage_rpm.py b/gbp/scripts/buildpackage_rpm.py index c51ccfe4..2857204d 100755 --- a/gbp/scripts/buildpackage_rpm.py +++ b/gbp/scripts/buildpackage_rpm.py @@ -459,6 +459,10 @@ def main(argv): try: branch = repo.get_branch() + except GitRepositoryError: + branch = None + + try: if not options.export_only: Command(options.cleaner, shell=True)() if not options.ignore_new: |