From fabf2097a0a46118062a293a9a5a5191db0233cc Mon Sep 17 00:00:00 2001 From: pengtao Date: Tue, 15 Jun 2021 17:11:52 +0800 Subject: [PATCH] 1 --- deploy/deploy_git.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/deploy/deploy_git.py b/deploy/deploy_git.py index 68f2021..a2c8cfe 100644 --- a/deploy/deploy_git.py +++ b/deploy/deploy_git.py @@ -48,12 +48,11 @@ class DeployGit: pre_script = self.infos[0][5] self.tag_name = "{name}{now}".format(name=self.name, now=self.now) pdb.set_trace() - build_cmd = "mkdir -p /data/publish/git/{name} && cd /data/publish/git/{name} && git clone {url} && cd {name} && sh {pre_script} && cd .. && tar tar zcvf {tag_name}.tar.gz {name} ".format( + build_cmd = "cd /data/publish/git && git clone {url} . && cd {name} && sh {pre_script} && cd .. && tar tar zcvf {tag_name}.tar.gz {name} ".format( name=self.name, url=url, tag_name=self.tag_name, pre_script=pre_script) os.system(build_cmd) - self.tag_file = os.path.isfile( - "/data/publish/git/"+self.tag_name+'tag.gz') - if self.tag_file: + self.tag_file = "/data/publish/git/"+self.tag_name+'tag.gz' + if os.path.isfile(self.tag_file): return True else: return False