mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-16 16:02:33 +03:00
support git@gitlab.com: style URLs in servergitmirrors
This converts the git@gitlab.com SSH URLs to the proper HTTPS URLs that fdroidclient can directly use.
This commit is contained in:
parent
183ce9541b
commit
5cc15d0fa9
2 changed files with 23 additions and 15 deletions
|
@ -22,6 +22,7 @@ import hashlib
|
|||
import os
|
||||
import paramiko
|
||||
import pwd
|
||||
import re
|
||||
import subprocess
|
||||
from argparse import ArgumentParser
|
||||
import logging
|
||||
|
@ -235,9 +236,8 @@ def update_servergitmirrors(servergitmirrors, repo_section):
|
|||
|
||||
repo = git.Repo.init(repo_dir)
|
||||
|
||||
# take care of each mirror
|
||||
for mirror in servergitmirrors:
|
||||
hostname = mirror.split("/")[2]
|
||||
hostname = re.sub(r'\W*\w+\W+(\w+).*', r'\1', mirror)
|
||||
repo.create_remote(hostname, mirror)
|
||||
logging.info('Mirroring to: ' + mirror)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue