aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2015-01-29 09:25:38 +0100
committerGuido Günther <agx@sigxcpu.org>2015-01-29 10:57:39 +0100
commit229f259f8c205db5924eb3e276872ecc3d7eb370 (patch)
tree174df05820cb55047bcedebf067461102d9538f8
parentddb0dd2878d83d41566434af630214ea8aa90afc (diff)
buildpackage: Tag currently checked out head
Tag the head checked out at command invocation. The build can take some time and the repo might have changed underneath us. Closes: #776506
-rwxr-xr-xgbp/scripts/buildpackage.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gbp/scripts/buildpackage.py b/gbp/scripts/buildpackage.py
index e4ec26a8..1c48c054 100755
--- a/gbp/scripts/buildpackage.py
+++ b/gbp/scripts/buildpackage.py
@@ -534,6 +534,7 @@ def main(argv):
gbp.log.err("You are not on branch '%s' but on '%s'" % (options.debian_branch, branch))
raise GbpError("Use --git-ignore-branch to ignore or --git-debian-branch to set the branch name.")
+ head = repo.head
tree = write_tree(repo, options)
source = source_vfs(repo, options, tree)
if not options.tag_only:
@@ -609,7 +610,9 @@ def main(argv):
version=source.changelog.version))
repo.create_tag(name=tag,
msg=tag_msg,
- sign=options.sign_tags, keyid=options.keyid)
+ sign=options.sign_tags,
+ commit=head,
+ keyid=options.keyid)
if options.posttag:
sha = repo.rev_parse("%s^{}" % tag)
Hook('Posttag', options.posttag, shell=True,