From 98f3fdf57dae6a9bf8aab619f75bbaad8c68c02a Mon Sep 17 00:00:00 2001 From: vapao Date: Tue, 9 Jun 2020 10:21:46 +0800 Subject: [PATCH] =?UTF-8?q?U=20=E4=BC=98=E5=8C=96=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E5=B7=B2=E5=AD=98=E5=9C=A8=E7=9A=84=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_api/apps/deploy/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spug_api/apps/deploy/utils.py b/spug_api/apps/deploy/utils.py index a1f2a69..0fc75c6 100644 --- a/spug_api/apps/deploy/utils.py +++ b/spug_api/apps/deploy/utils.py @@ -139,7 +139,7 @@ def _deploy_ext1_host(helper, h_id, extend, env): if env.SPUG_DEPLOY_TYPE != '2': code, _ = ssh.exec_command(f'mkdir -p {extend.dst_repo} && [ -e {extend.dst_dir} ] && [ ! -L {extend.dst_dir} ]') if code == 0: - helper.send_error(host.id, f'please make sure the {extend.dst_dir!r} is not exists.') + helper.send_error(host.id, f'检测到该主机的发布目录 {extend.dst_dir!r} 已存在,为了数据安全请自行备份后删除该目录,Spug 将会创建并接管该目录。') # clean clean_command = f'ls -d {extend.deploy_id}_* 2> /dev/null | sort -t _ -rnk2 | tail -n +{extend.versions + 1} | xargs rm -rf' helper.remote(host.id, ssh, f'cd {extend.dst_repo} && rm -rf {env.SPUG_VERSION} && {clean_command}')