From c520a23b09d1dce9c4f93087c549329426add408 Mon Sep 17 00:00:00 2001 From: James Rowe Date: Mon, 9 Jan 2017 21:12:30 -0700 Subject: [PATCH] Delete the remote branch before pushing --- tag_build.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tag_build.py b/tag_build.py index 6392020..3adbb03 100644 --- a/tag_build.py +++ b/tag_build.py @@ -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