Commit 18be409c authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

Properly allow debian revisions

* Debian tag should be derived from debian version
* Python tag will be the same for different debian revisions
parent ffcbf2bb
......@@ -35,6 +35,8 @@
import os
import sys
from git import GitCommandError
from optparse import OptionParser
from sh import mktemp, cd, rm, git_dch # pylint: disable=E0611
from configobj import ConfigObj
......@@ -213,7 +215,11 @@ def main():
# Tag branch with python version
branch_tag = python_version
repo.git.tag(branch_tag, branch)
repo.git.tag(branch_tag, branch)
except GitCommandError:
# Tag may already exist, if only the debian branch has changed
upstream_tag = "upstream/" + branch_tag
repo.git.tag(upstream_tag, branch)
......@@ -242,7 +248,7 @@ def main():
# Commit Changes
repo.git.commit("-s", "-a", m="Bump version to %s" % debian_version)
# Tag debian branch
debian_branch_tag = "debian/" + branch_tag
debian_branch_tag = "debian/" + debian_version
# Add files to repo
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment