import subprocess
import sys

# List of scripts to run in order
scripts = ['publish-project.py', 'image-create.py', 'image-push.py']

for script in scripts:
    print(f"Executing {script}...")
    try:
        # Run the script using the current Python interpreter
        subprocess.run([sys.executable, script], check=True)
        print(f"{script} executed successfully.\n")
    except subprocess.CalledProcessError as error:
        print(f"Error: {script} failed with exit code {error.returncode}.")
        break
