assets/scripts/setup.py [345:366]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def configure_frontend(agent_name: str, backend_url: str, env_tag: str, config_file: str):
    search_and_replace_file(config_file, r"const env: string = \"(.*?)\"", f'const env: string = "{env_tag}"')
    search_and_replace_file(config_file, r"backendURL = \"(.*?)\"", f'backendURL = "{backend_url}/"')
    search_and_replace_file(config_file, r"chatbotName = \"(.*?)\"", f'chatbotName = "{agent_name}"')

def build_and_deploy_cloud_run(
        project_id: str,
        region: str,
        container_name: str,
        artifact_registry_name: str,
        service_name: str,
        build_file_location: str,
        is_backend: bool,
    ):
    push_command = [
        "gcloud",
        "builds",
        "submit",
        "--config",
        build_file_location,
        "--substitutions",
        f"_PROJECT_ID={project_id},_REGION={region},_CONTAINER_NAME={container_name},_ARTIFACT_REGISTRY_REPO_NAME={artifact_registry_name},_SERVICE_NAME={service_name}",
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



build.py [322:343]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def configure_frontend(agent_name: str, backend_url: str, env_tag: str, config_file: str):
    search_and_replace_file(config_file, r"const env: string = \"(.*?)\"", f'const env: string = "{env_tag}"')
    search_and_replace_file(config_file, r"backendURL = \"(.*?)\"", f'backendURL = "{backend_url}/"')
    search_and_replace_file(config_file, r"chatbotName = \"(.*?)\"", f'chatbotName = "{agent_name}"')

def build_and_deploy_cloud_run(
        project_id: str,
        region: str,
        container_name: str,
        artifact_registry_name: str,
        service_name: str,
        build_file_location: str,
        is_backend: bool,
    ):
    push_command = [
        "gcloud",
        "builds",
        "submit",
        "--config",
        build_file_location,
        "--substitutions",
        f"_PROJECT_ID={project_id},_REGION={region},_CONTAINER_NAME={container_name},_ARTIFACT_REGISTRY_REPO_NAME={artifact_registry_name},_SERVICE_NAME={service_name}",
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



