mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-20 20:00:37 +02:00
style(deploy): rename working_dir_root
variable to workspace_dir
This commit is contained in:
parent
78b6e53e42
commit
5ff9a19072
@ -457,11 +457,11 @@ def update_servergitmirrors(servergitmirrors, repo_section):
|
||||
logging.debug(_('Offline machine, skipping git mirror generation until `fdroid deploy`'))
|
||||
return
|
||||
|
||||
working_dir_root = Path(os.getcwd())
|
||||
workspace_dir = Path(os.getcwd())
|
||||
|
||||
# right now we support only 'repo' git-mirroring
|
||||
if repo_section == 'repo':
|
||||
git_mirror_path = working_dir_root / 'git-mirror'
|
||||
git_mirror_path = workspace_dir / 'git-mirror'
|
||||
dotgit = os.path.join(git_mirror_path, '.git')
|
||||
git_fdroiddir = os.path.join(git_mirror_path, 'fdroid')
|
||||
git_repodir = os.path.join(git_fdroiddir, repo_section)
|
||||
@ -519,9 +519,9 @@ def update_servergitmirrors(servergitmirrors, repo_section):
|
||||
# trailing slashes have a meaning in rsync which is not needed here, so
|
||||
# make sure both paths have exactly one trailing slash
|
||||
if is_index_only:
|
||||
files_to_sync = [str(working_dir_root / repo_section / index_file) for index_file in INDEX_FILES]
|
||||
files_to_sync = [str(workspace_dir / repo_section / index_file) for index_file in INDEX_FILES]
|
||||
else:
|
||||
files_to_sync = [str(working_dir_root / repo_section).rstrip('/') + '/']
|
||||
files_to_sync = [str(workspace_dir / repo_section).rstrip('/') + '/']
|
||||
common.local_rsync(options, files_to_sync, git_repodir.rstrip('/') + '/')
|
||||
|
||||
upload_to_servergitmirror(mirror_config=d,
|
||||
@ -624,7 +624,7 @@ def upload_to_servergitmirror(mirror_config: Dict[str, str],
|
||||
local_repo.index.add(['.gitlab-ci.yml'])
|
||||
local_repo.index.commit("fdroidserver git-mirror: Deploy to GitLab Pages")
|
||||
|
||||
logging.debug(_('Pushing to {url}').format(url=remote.url))
|
||||
logging.info(_('Pushing to {url}').format(url=remote.url))
|
||||
with local_repo.git.custom_environment(GIT_SSH_COMMAND=ssh_cmd):
|
||||
pushinfos = remote.push(
|
||||
f"{local_branch_name}:{remote_branch_name}", force=True, set_upstream=True, progress=progress
|
||||
|
Loading…
Reference in New Issue
Block a user