Feat: Se actualizan parámetros

This commit is contained in:
sinergia 2024-03-10 16:13:24 -05:00
parent f4a05cbb76
commit c7a336d05d

View File

@ -14,7 +14,7 @@ parser = argparse.ArgumentParser(
description='Script para clonar los modulos que se utilizaran')
# Empresas permitidas
empresas_permitidos = ["OneTeam", "NaNtic", "Trytond"]
empresas_permitidos = ["OneTeam", "NaNtic"]
# Agregar al menos un argumento de tipo str para elegir la empresa
parser.add_argument(
@ -46,10 +46,11 @@ with open('deployes/modules.txt', 'r') as file_txt:
try:
for empresa in empresas:
with open('modules.yml', 'r') as file:
with open('./modules.yml', 'r') as 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:
if modulo in selected_modules:
@ -60,7 +61,7 @@ try:
if directorio_principal == os.getcwd():
os.chdir(destination_dir)
comand: str = f'git clone {link_module}'
comand: str = f'git clone {link_module} -b {branch}'
subprocess.run(comand,
shell=True,
check=True,