From 467f9e99e18a8b655fcaa083efc1c51504b58b80 Mon Sep 17 00:00:00 2001 From: vapao Date: Wed, 22 Jul 2020 22:50:02 +0800 Subject: [PATCH] =?UTF-8?q?F=20=E4=BF=AE=E5=A4=8D=E5=B8=B8=E8=A7=84?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E6=96=87=E4=BB=B6=E8=BF=87=E6=BB=A4=E6=8E=92?= =?UTF-8?q?=E9=99=A4=E8=A7=84=E5=88=99=E5=8F=AF=E8=83=BD=E5=A4=9A=E6=8E=92?= =?UTF-8?q?=E9=99=A4=E6=96=87=E4=BB=B6=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 f68f018..3c93769 100644 --- a/spug_api/apps/deploy/utils.py +++ b/spug_api/apps/deploy/utils.py @@ -90,7 +90,7 @@ def _ext1_deploy(req, helper, env): files = helper.parse_filter_rule(filter_rule['data']) if files: if filter_rule['type'] == 'exclude': - exclude = ' '.join(f'--exclude={x}' for x in files) + exclude = ' '.join(f'--exclude={env.SPUG_VERSION}/{x}' for x in files) else: contain = ' '.join(f'{env.SPUG_VERSION}/{x}' for x in files) helper.local(f'cd {REPOS_DIR} && tar zcf {env.SPUG_VERSION}.tar.gz {exclude} {contain}') @@ -352,10 +352,10 @@ class Helper: if res.get('errcode') != 0: Notify.make_notify('flag', '1', '发布通知发送失败', f'返回数据:{res}') - def parse_filter_rule(self, data: str): + def parse_filter_rule(self, data: str, sep='\n'): data, files = data.strip(), [] if data: - for line in data.split('\n'): + for line in data.split(sep): line = line.strip() if line and not line.startswith('#'): files.append(line)