Prepare internal extension distribution

This commit is contained in:
2026-04-29 16:58:35 +08:00
parent 4f1f80b79b
commit 37e29bd6b8
23 changed files with 380 additions and 38 deletions
+24
View File
@@ -0,0 +1,24 @@
import { mkdir, rm } from "node:fs/promises";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { execFile } from "node:child_process";
import { promisify } from "node:util";
const execFileAsync = promisify(execFile);
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const projectRoot = path.resolve(__dirname, "..");
const sourceDir = path.join(projectRoot, "dist-release");
const releaseDir = path.join(projectRoot, "release");
const archivePath = path.join(
releaseDir,
"star-chart-search-enhancer-internal.zip"
);
await mkdir(releaseDir, { recursive: true });
await rm(archivePath, { force: true });
await execFileAsync("zip", ["-X", "-r", archivePath, "."], {
cwd: sourceDir
});
console.log(`Internal archive created at ${archivePath}`);