[DEV] update methode to clone the repository (done it in generic)
This commit is contained in:
parent
065b3ea6a7
commit
78f559ec21
@ -84,20 +84,14 @@ def execute(_arguments):
|
|||||||
conf.set_manifest_name(manifest_name)
|
conf.set_manifest_name(manifest_name)
|
||||||
conf.store()
|
conf.store()
|
||||||
|
|
||||||
#clone the manifest repository
|
debug.info("Clone the manifest")
|
||||||
cmd = "git clone " + address_manifest + " --branch " + branch + " " + env.get_island_path_manifest()
|
commands.clone(env.get_island_path_manifest(), address_manifest, branch_name=branch):
|
||||||
|
|
||||||
debug.info("clone the manifest")
|
|
||||||
ret = multiprocess.run_command_direct(cmd)
|
|
||||||
|
|
||||||
if ret == "":
|
|
||||||
return True
|
|
||||||
|
|
||||||
if ret == False:
|
if ret == False:
|
||||||
# all is good, ready to get the system work corectly
|
|
||||||
return True
|
|
||||||
debug.info("'" + ret + "'")
|
debug.info("'" + ret + "'")
|
||||||
debug.error("Init does not work")
|
debug.error("Init does not work")
|
||||||
return False
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,15 +95,16 @@ def execute(_arguments):
|
|||||||
#clone the manifest repository
|
#clone the manifest repository
|
||||||
address_manifest = ""
|
address_manifest = ""
|
||||||
### example git@git.plouf.com:basic_folder
|
### example git@git.plouf.com:basic_folder
|
||||||
cmd = "git clone " + elem.select_remote["fetch"]
|
address_manifest = elem.select_remote["fetch"]
|
||||||
if elem.select_remote["fetch"][0:4] == "git@" \
|
if elem.select_remote["fetch"][0:4] == "git@" \
|
||||||
and len(elem.select_remote["fetch"][4:].split(":")) <= 1:
|
and len(elem.select_remote["fetch"][4:].split(":")) <= 1:
|
||||||
cmd += ":"
|
address_manifest += ":"
|
||||||
else:
|
else:
|
||||||
cmd += "/"
|
address_manifest += "/"
|
||||||
cmd += elem.name + " --branch " + elem.branch + " --origin " + elem.select_remote["name"] + " " + git_repo_path
|
address_manifest += elem.name
|
||||||
|
+ " --branch " + elem.branch + " --origin " + elem.select_remote["name"] + " " + git_repo_path
|
||||||
debug.info("clone the repo")
|
debug.info("clone the repo")
|
||||||
ret = multiprocess.run_command_direct(cmd)
|
ret = commands.clone(git_repo_path, address_manifest, branch_name=elem.branch, origin=elem.select_remote["name"]):
|
||||||
if ret != "" \
|
if ret != "" \
|
||||||
and ret != False:
|
and ret != False:
|
||||||
# all is good, ready to get the system work corectly
|
# all is good, ready to get the system work corectly
|
||||||
|
Loading…
x
Reference in New Issue
Block a user