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