mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-21 04:10:37 +02:00
fix(deploy): all files are uploaded if the index only mode deployment follows a full mode one
This commit is contained in:
parent
c190b7fb56
commit
bd2eaa5868
@ -684,7 +684,6 @@ def update_servergitmirrors(servergitmirrors, repo_section):
|
|||||||
progress = None
|
progress = None
|
||||||
|
|
||||||
repo = git.Repo.init(git_mirror_path, initial_branch=GIT_BRANCH)
|
repo = git.Repo.init(git_mirror_path, initial_branch=GIT_BRANCH)
|
||||||
initial_ref = repo.head.ref
|
|
||||||
|
|
||||||
enabled_remotes = []
|
enabled_remotes = []
|
||||||
for d in servergitmirrors:
|
for d in servergitmirrors:
|
||||||
@ -704,7 +703,7 @@ def update_servergitmirrors(servergitmirrors, repo_section):
|
|||||||
progress=progress)
|
progress=progress)
|
||||||
|
|
||||||
# Switch to the initial branch
|
# Switch to the initial branch
|
||||||
repo.head.reference = initial_ref
|
repo.git.checkout(GIT_BRANCH)
|
||||||
if progress:
|
if progress:
|
||||||
progressbar.done()
|
progressbar.done()
|
||||||
|
|
||||||
@ -758,11 +757,14 @@ def upload_to_servergitmirror(mirror_config: Dict[str, str],
|
|||||||
logging.debug('Adding all files to git mirror')
|
logging.debug('Adding all files to git mirror')
|
||||||
local_repo.git.add(all=True)
|
local_repo.git.add(all=True)
|
||||||
|
|
||||||
print("git status:", local_repo.git.status())
|
|
||||||
|
|
||||||
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
|
||||||
|
print(f"In index-only: {index_only} mode")
|
||||||
|
print(local_repo.git.status())
|
||||||
|
print(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:
|
||||||
gitlab_ci_job_name = 'pages'
|
gitlab_ci_job_name = 'pages'
|
||||||
|
Loading…
Reference in New Issue
Block a user