Feat: Se actualizan parámetros
This commit is contained in:
parent
f4a05cbb76
commit
c7a336d05d
@ -14,7 +14,7 @@ parser = argparse.ArgumentParser(
|
|||||||
description='Script para clonar los modulos que se utilizaran')
|
description='Script para clonar los modulos que se utilizaran')
|
||||||
|
|
||||||
# Empresas permitidas
|
# Empresas permitidas
|
||||||
empresas_permitidos = ["OneTeam", "NaNtic", "Trytond"]
|
empresas_permitidos = ["OneTeam", "NaNtic"]
|
||||||
|
|
||||||
# Agregar al menos un argumento de tipo str para elegir la empresa
|
# Agregar al menos un argumento de tipo str para elegir la empresa
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
@ -46,10 +46,11 @@ with open('deployes/modules.txt', 'r') as file_txt:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
for empresa in empresas:
|
for empresa in empresas:
|
||||||
with open('modules.yml', 'r') as file:
|
with open('./modules.yml', 'r') as file:
|
||||||
dict_modules = yaml.safe_load(file)
|
dict_modules = yaml.safe_load(file)
|
||||||
|
|
||||||
list_modules = dict_modules[empresa]
|
list_modules = dict_modules[empresa]['modules']
|
||||||
|
branch = dict_modules[empresa]['branch']
|
||||||
|
|
||||||
for modulo in list_modules:
|
for modulo in list_modules:
|
||||||
if modulo in selected_modules:
|
if modulo in selected_modules:
|
||||||
@ -60,7 +61,7 @@ try:
|
|||||||
if directorio_principal == os.getcwd():
|
if directorio_principal == os.getcwd():
|
||||||
os.chdir(destination_dir)
|
os.chdir(destination_dir)
|
||||||
|
|
||||||
comand: str = f'git clone {link_module}'
|
comand: str = f'git clone {link_module} -b {branch}'
|
||||||
subprocess.run(comand,
|
subprocess.run(comand,
|
||||||
shell=True,
|
shell=True,
|
||||||
check=True,
|
check=True,
|
||||||
|
Loading…
Reference in New Issue
Block a user