mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-19 21:30:10 +01:00
Merge branch 'gitlab-mirrors-reorder' into 'master'
Reorder the gitlab mirrors so GitLab Pages comes before "raw". See merge request fdroid/fdroidserver!438
This commit is contained in:
commit
4612ddf312
@ -649,12 +649,17 @@ def get_mirror_service_urls(url):
|
|||||||
segments.extend([branch, folder])
|
segments.extend([branch, folder])
|
||||||
urls.append('/'.join(segments))
|
urls.append('/'.join(segments))
|
||||||
elif hostname == "gitlab.com":
|
elif hostname == "gitlab.com":
|
||||||
# Gitlab Raw "https://gitlab.com/user/repo/raw/branch/folder"
|
# Both these Gitlab URLs will work with F-Droid, but only the first will work in the browser
|
||||||
gitlab_raw = segments + ['raw', branch, folder]
|
# This is because the `raw` URLs are not served with the correct mime types, so any
|
||||||
urls.append('/'.join(gitlab_raw))
|
# index.html which is put in the repo will not be rendered. Putting an index.html file in
|
||||||
|
# the repo root is a common way for to make information about the repo available to end user.
|
||||||
|
|
||||||
# Gitlab-like Pages segments "https://user.gitlab.io/repo/folder"
|
# Gitlab-like Pages segments "https://user.gitlab.io/repo/folder"
|
||||||
gitlab_pages = ["https:", "", user + ".gitlab.io", repo, folder]
|
gitlab_pages = ["https:", "", user + ".gitlab.io", repo, folder]
|
||||||
urls.append('/'.join(gitlab_pages))
|
urls.append('/'.join(gitlab_pages))
|
||||||
|
# Gitlab Raw "https://gitlab.com/user/repo/raw/branch/folder"
|
||||||
|
gitlab_raw = segments + ['raw', branch, folder]
|
||||||
|
urls.append('/'.join(gitlab_raw))
|
||||||
return urls
|
return urls
|
||||||
|
|
||||||
return urls
|
return urls
|
||||||
|
Loading…
Reference in New Issue
Block a user