1
This commit is contained in:
parent
547ab9585c
commit
fabf2097a0
@ -48,12 +48,11 @@ class DeployGit:
|
|||||||
pre_script = self.infos[0][5]
|
pre_script = self.infos[0][5]
|
||||||
self.tag_name = "{name}{now}".format(name=self.name, now=self.now)
|
self.tag_name = "{name}{now}".format(name=self.name, now=self.now)
|
||||||
pdb.set_trace()
|
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)
|
name=self.name, url=url, tag_name=self.tag_name, pre_script=pre_script)
|
||||||
os.system(build_cmd)
|
os.system(build_cmd)
|
||||||
self.tag_file = os.path.isfile(
|
self.tag_file = "/data/publish/git/"+self.tag_name+'tag.gz'
|
||||||
"/data/publish/git/"+self.tag_name+'tag.gz')
|
if os.path.isfile(self.tag_file):
|
||||||
if self.tag_file:
|
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user