from .context import Context
from .project_build import ProjectBuild
from .project_copy import ProjectCopy
from .project_end import ProjectEnd
from .project_init import ProjectInit
from .project_update import ProjectUpdate
from .project_upload import ProjectUpload

from utils.logger_utils import app_logger


def run(context: Context):
    app_logger().info("build run.")
    tasks = [
        ProjectInit(context),
        ProjectCopy(context),
        ProjectUpdate(context),
        ProjectBuild(context),
        ProjectUpload(context),
        ProjectEnd(context),
    ]

    for task in tasks:
        app_logger().info(f"start[{task.__class__.__name__}]")
        task.execute()
        app_logger().info(f"end[{task.__class__.__name__}]")

    app_logger().info(context)
    pass
