From c7a336d05de9bd7c1151da18fd713b65d06f2150 Mon Sep 17 00:00:00 2001 From: sinergia Date: Sun, 10 Mar 2024 16:13:24 -0500 Subject: [PATCH] =?UTF-8?q?Feat:=20Se=20actualizan=20par=C3=A1metros?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules.py b/modules.py index bd8f2bb..96a7713 100644 --- a/modules.py +++ b/modules.py @@ -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,