Skip to content

Commit

Permalink
Sync repo (in addition to tag) during mead build
Browse files Browse the repository at this point in the history
  • Loading branch information
nikosmoum authored and FrostyX committed Feb 23, 2022
1 parent 7177422 commit 45d431a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tito/release/distgit.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ def __init__(self, name=None, tag=None, build_dir=None,
self.push_url = self.push_url.replace(MEAD_SCM_USERNAME, user)

def _sync_mead_scm(self):
cmd = "git push %s %s" % (self.push_url, self.builder.build_tag)
cmd = "git push --follow-tags %s %s" % (self.push_url, self.git_branches[0])

if self.dry_run:
self.print_dry_run_warning(cmd)
Expand All @@ -565,9 +565,9 @@ def _sync_mead_scm(self):
except RunCommandException as e:
if "rejected" in e.output:
if self._ask_yes_no("The remote rejected a push. Force push? [y/n] ", False):
run_command("git push --force %s %s" % (self.mead_scm, self.builder.build_tag))
run_command("git push --force --follow-tags %s %s" % (self.push_url, self.git_branches[0]))
else:
error_out("Could not sync with %s" % self.mead_scm)
error_out("Could not sync with %s" % self.push_url)
raise

def _git_release(self):
Expand Down

0 comments on commit 45d431a

Please sign in to comment.