1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-09-21 04:10:37 +02:00

chore(deploy): clean up code

This commit is contained in:
proletarius101 2024-06-04 20:27:01 +08:00
parent 9244189ce5
commit b48e297ec2
No known key found for this signature in database

View File

@ -731,12 +731,6 @@ def upload_to_servergitmirror(mirror_config: Dict[str, str],
git_mirror_path: str, git_mirror_path: str,
ssh_cmd: str, ssh_cmd: str,
progress: git.RemoteProgress) -> None: progress: git.RemoteProgress) -> None:
# Test
logging.info(f"mirror_config: {mirror_config}")
# List all files in the git repo
logging.info("files:")
logging.info(local_repo.git.ls_files())
remote_branch_name = GIT_BRANCH remote_branch_name = GIT_BRANCH
local_branch_name = local_repo.active_branch.name local_branch_name = local_repo.active_branch.name
@ -754,8 +748,6 @@ def upload_to_servergitmirror(mirror_config: Dict[str, str],
logging.info("git status:", local_repo.git.status()) logging.info("git status:", local_repo.git.status())
if is_index_only: if is_index_only:
# test
logging.debug('Adding index files to git mirror')
local_repo.index.add(_get_index_file_paths(os.path.join('fdroid', repo_section))) local_repo.index.add(_get_index_file_paths(os.path.join('fdroid', repo_section)))
else: else:
# sadly index.add don't allow the --all parameter # sadly index.add don't allow the --all parameter
@ -765,10 +757,6 @@ def upload_to_servergitmirror(mirror_config: Dict[str, str],
logging.debug('Committing files into git mirror') logging.debug('Committing files into git mirror')
local_repo.index.commit("fdroidserver git-mirror") local_repo.index.commit("fdroidserver git-mirror")
# Test
logging.info(f"In index-only: {is_index_only} mode")
logging.info(local_repo.git.status())
logging.info(local_repo.head.log())
# only deploy to GitLab Artifacts if too big for GitLab Pages # only deploy to GitLab Artifacts if too big for GitLab Pages
if common.get_dir_size(fdroid_dir) <= common.GITLAB_COM_PAGES_MAX_SIZE: if common.get_dir_size(fdroid_dir) <= common.GITLAB_COM_PAGES_MAX_SIZE: