Browse Source

Change remote origin url to organization

pull/6065/head
Ruud 9 years ago
parent
commit
cc98412f9a
  1. 10
      couchpotato/core/_base/updater/main.py

10
couchpotato/core/_base/updater/main.py

@ -188,9 +188,19 @@ class BaseUpdater(Plugin):
class GitUpdater(BaseUpdater):
old_repo = 'RuudBurger/CouchPotatoServer'
new_repo = 'CouchPotato/CouchPotatoServer'
def __init__(self, git_command):
self.repo = LocalRepository(Env.get('app_dir'), command = git_command)
remote_name = 'origin'
remote = self.repo.getRemoteByName(remote_name)
if self.old_repo in remote.url:
log.info('Changing repo to new github organization: %s -> %s', (self.old_repo, self.new_repo))
new_url = remote.url.replace(self.old_repo, self.new_repo)
self.repo._executeGitCommandAssertSuccess("remote set-url %s %s" % (remote_name, new_url))
def doUpdate(self):
try:

Loading…
Cancel
Save