This commit is contained in:
parent
2c3f55ec90
commit
9e8dd694d9
3 changed files with 20 additions and 24 deletions
|
@ -55,6 +55,24 @@ def cd_list_environment():
|
|||
print(variable, '=', value)
|
||||
|
||||
|
||||
def cd_synchronize():
|
||||
sync_host = 'rwx.work'
|
||||
sync_source = 'out'
|
||||
sync_user = 'cd'
|
||||
#
|
||||
sync_root = f'/{sync_user}/{project.branch}/{project.name}'
|
||||
#
|
||||
sync_target = f'{sync_user}@{sync_host}:{sync_root}'
|
||||
ps.run('rsync',
|
||||
'--archive',
|
||||
'--delete-before',
|
||||
'--verbose',
|
||||
f'{sync_source}/',
|
||||
f'{sync_target}/',
|
||||
'--dry-run',
|
||||
)
|
||||
|
||||
|
||||
def install_commands(path):
|
||||
user = '/usr/local/bin'
|
||||
for command in [
|
||||
|
@ -62,6 +80,7 @@ def install_commands(path):
|
|||
'build-project',
|
||||
'clone-branch',
|
||||
'list-environment',
|
||||
'synchronize',
|
||||
]:
|
||||
print(command)
|
||||
os.symlink(path, os.path.join(user, f'{COMMANDS_PREFIX}{command}'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue