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', )