39 lines
1.3 KiB
Python
39 lines
1.3 KiB
Python
import subprocess
|
|
import sys
|
|
import os
|
|
|
|
scripts = [
|
|
'setup_roles.py',
|
|
'seed_categories.py',
|
|
'seed_projects.py',
|
|
'seed_specialties.py'
|
|
]
|
|
|
|
def run_all():
|
|
print("🚀 Iniciando Sembrado Maestro (Master Seed) de EFINTEL ERP...")
|
|
|
|
# Get the directory of this script
|
|
base_dir = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
for script in scripts:
|
|
script_path = os.path.join(base_dir, script)
|
|
print(f"\n--------------------------------------------------")
|
|
print(f"👉 Ejecutando: {script}...")
|
|
print(f"--------------------------------------------------")
|
|
|
|
# Run script with current python interpreter
|
|
result = subprocess.run([sys.executable, script_path], check=False)
|
|
|
|
if result.returncode != 0:
|
|
print(f"\n❌ Error al ejecutar {script}. Sembrado interrumpido.")
|
|
sys.exit(1)
|
|
|
|
print("\n==================================================")
|
|
print("✅ ¡Sembrado Maestro Completado Exitosamente!")
|
|
print("Las categorías, portafolios, proyectos, roles y")
|
|
print("especialistas coinciden al 100% con tu entorno actual.")
|
|
print("==================================================")
|
|
|
|
if __name__ == "__main__":
|
|
run_all()
|