From 4795c9e9aefc0f35595bb015572933c9382de601 Mon Sep 17 00:00:00 2001 From: vapao Date: Fri, 9 Oct 2020 18:26:48 +0800 Subject: [PATCH] =?UTF-8?q?F=20=E4=BF=AE=E5=A4=8D=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E5=AF=BC=E8=87=B4nohup=E6=97=A0=E6=B3=95=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_api/apps/deploy/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spug_api/apps/deploy/utils.py b/spug_api/apps/deploy/utils.py index 28680fc..163cf30 100644 --- a/spug_api/apps/deploy/utils.py +++ b/spug_api/apps/deploy/utils.py @@ -218,7 +218,7 @@ def _deploy_ext1_host(helper, h_id, extend, env): repo_dir = os.path.join(extend.dst_repo, env.SPUG_VERSION) if extend.hook_pre_host: helper.send_step(h_id, 2, f'{human_time()} 发布前任务... \r\n') - command = f'cd {repo_dir} && {extend.hook_pre_host}' + command = f'cd {repo_dir} ; {extend.hook_pre_host}' helper.remote(host.id, ssh, command, env) # do deploy @@ -229,7 +229,7 @@ def _deploy_ext1_host(helper, h_id, extend, env): # post host if extend.hook_post_host: helper.send_step(h_id, 4, f'{human_time()} 发布后任务... \r\n') - command = f'cd {extend.dst_dir} && {extend.hook_post_host}' + command = f'cd {extend.dst_dir} ; {extend.hook_post_host}' helper.remote(host.id, ssh, command, env) helper.send_step(h_id, 5, f'\r\n{human_time()} ** 发布成功 **') @@ -264,7 +264,7 @@ def _deploy_ext2_host(helper, h_id, actions, env): command = f'cd /tmp && tar xf {tar_gz_file} && rm -f {tar_gz_file} ' command += f'&& rm -rf {action["dst"]} && mv /tmp/{sd_dst} {action["dst"]} && echo "transfer completed"' else: - command = f'cd /tmp && {action["data"]}' + command = f'cd /tmp ; {action["data"]}' helper.remote(host.id, ssh, command, env) helper.send_step(h_id, 100, f'\r\n{human_time()} ** 发布成功 **')