import {cd, path} from 'zx'
import {trim} from "licia";
import {run_deploy_batch, run_deploy_root, run_package, run_upload_normal} from "./library.js";

// 切换目录
cd(trim(path.dirname(import.meta.dirname)))
// 执行流程
try {
    await run_deploy_root()
    await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest'])
    await run_package('service-api')
    await run_upload_normal('service-api')
} catch (e) {
    console.error(e)
}