Delete the remote branch before pushing

This commit is contained in:
James Rowe 2017-01-09 21:12:30 -07:00
parent 499acc800b
commit c520a23b09

View File

@ -157,6 +157,9 @@ class TagMergeBot:
def sync(self):
_git("push", "-f", self.push_repo["name"], "master", cwd=self.tracking_path)
def remove_remote_branch(self):
_git("push", self.push_repo["name"], "--delete", self.branch_name, cwd=self.tracking_path)
def push(self):
_git("push", "-f", self.push_repo["name"], self.branch_name, cwd=self.tracking_path)
@ -208,6 +211,7 @@ if __name__ == "__main__":
t.pull_branches()
failed = t.merge()
logger.info("Number of failed merges: {failed}".format(failed=failed))
t.remove_remote_branch()
t.push()
# save this runs information