mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-14 06:52:39 +03:00
index: do not include GitLab Pages mirror if it can't be deployed
GitLab Pages sites are limited to 1GB on gitlab.com, so the CI/CD job will fail if the repo is bigger than that. It should not be included as a mirror in that case. https://docs.gitlab.com/ee/user/gitlab_com/#gitlab-pages
This commit is contained in:
parent
eb2fdc5a58
commit
7987c746de
3 changed files with 48 additions and 17 deletions
|
@ -111,6 +111,10 @@ MAX_VERSION_CODE = 0x7fffffff # Java's Integer.MAX_VALUE (2147483647)
|
|||
|
||||
XMLNS_ANDROID = '{http://schemas.android.com/apk/res/android}'
|
||||
|
||||
# https://docs.gitlab.com/ee/user/gitlab_com/#gitlab-pages
|
||||
GITLAB_COM_PAGES_MAX_SIZE = 1000000000
|
||||
|
||||
|
||||
config = None
|
||||
options = None
|
||||
env = None
|
||||
|
@ -478,6 +482,13 @@ def parse_human_readable_size(size):
|
|||
return int(float(m.group("value")) * units[m.group("unit")])
|
||||
|
||||
|
||||
def get_dir_size(path_or_str):
|
||||
"""Get the total size of all files in the given directory."""
|
||||
if isinstance(path_or_str, str):
|
||||
path_or_str = Path(path_or_str)
|
||||
return sum(f.stat().st_size for f in path_or_str.glob('**/*') if f.is_file())
|
||||
|
||||
|
||||
def assert_config_keystore(config):
|
||||
"""Check weather keystore is configured correctly and raise exception if not."""
|
||||
nosigningkey = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue