update_manager: only perform rsync backups on clean repos

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine 2021-03-26 08:53:49 -04:00
parent f0a6620267
commit b1f8eaae51
1 changed files with 3 additions and 1 deletions

View File

@ -807,6 +807,9 @@ class GitRepo:
if owner_match is not None:
self.git_owner = owner_match.group(1)
self.dirty = current_version.endswith("dirty")
if not self.dirty:
# backup the current repo if it is clean
await self._backup_repo()
# Parse Version Info
versions = []
@ -910,7 +913,6 @@ class GitRepo:
else:
self.git_branch = branch_info
self.valid_git_repo = True
await self._backup_repo()
return True
def log_repo_info(self):