As of version 0.4.47 git-buildpackage exports these environment variables to a called posttag hook:
- GBP_TAG: the tags name
- GBP_BRANCH: the branch you were on when creating the tag
- GBP_SHA1: the sha1 of the commit the tag was created at
This allows you to write posttag hooks that push out only the changes that correspond to the created tag. For a simple example see the GBP Manual. Using such a hook makes team maintenance a lot easier since you can't forget to push out the commits and tags for a newly uploaded package while making sure you don't push out any other changes.