feat: self-contained deploy/verify scripts in release package

- Add deploy.sh: imports data.sql, copies video, copies output files, verifies
- Add verify.sh: checks file integrity + DB/offline status
- Both scripts included in tar.gz via release package command
- Package now deployable standalone without release CLI
This commit is contained in:
Accusys
2026-05-13 04:35:43 +08:00
parent 48c3b13c37
commit c0c0e6e8ea
3 changed files with 152 additions and 0 deletions

View File

@@ -467,6 +467,16 @@ async fn cmd_package(db: &PostgresDb, uuid: &str) -> Result<()> {
}
println!(" Output files copied");
// Copy deploy + verify scripts into package
let deploy_src = "/Users/accusys/momentry_core_0.1/scripts/deploy_package.sh";
let verify_src = "/Users/accusys/momentry_core_0.1/scripts/verify_package.sh";
if Path::new(deploy_src).exists() {
fs::copy(deploy_src, outdir.join("deploy.sh"))?;
}
if Path::new(verify_src).exists() {
fs::copy(verify_src, outdir.join("verify.sh"))?;
}
// Create tar.gz
let tarball = Path::new(RELEASE_DIR).join(format!("{}_v{}.tar.gz", uuid, Utc::now().format("%Y%m%d_%H%M%S")));
let status = Command::new("tar")