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,