From a6b8990f4b6e2d2cb613df6738c0cc6c664161e8 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 2 Jun 2024 12:41:46 +0200 Subject: [PATCH] group --- cd/__init__.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cd/__init__.py b/cd/__init__.py index 05ae1d1..da21c09 100644 --- a/cd/__init__.py +++ b/cd/__init__.py @@ -56,19 +56,20 @@ def cd_list_environment(): def cd_synchronize(): - sync_host = 'rwx.work' - sync_source = 'out' - sync_user = 'cd' + host = 'rwx.work' + source = 'out' + user = 'cd' # - sync_root = f'/{sync_user}/{project.branch}/{project.name}' + root = os.sep.join([str(), + user, project.branch, projects.group, project.name]) # - sync_target = f'{sync_user}@{sync_host}:{sync_root}' + target = f'{user}@{host}:{root}' ps.run('rsync', '--archive', '--delete-before', '--verbose', - f'{sync_source}/', - f'{sync_target}/', + f'{source}/', + f'{target}/', '--dry-run', )