| 1 | const { execSync } = require("child_process"); |
| 2 | |
| 3 | const PLATFORMS = [ |
| 4 | "win32-x64", |
| 5 | // "win32-arm64", can't be built due to no sqlite3 binaries |
| 6 | "linux-x64", |
| 7 | "linux-arm64", |
| 8 | "darwin-x64", |
| 9 | "darwin-arm64", |
| 10 | ] |
| 11 | const args = process.argv.slice(2); |
| 12 | const isPreRelease = args.includes("--pre-release"); |
| 13 | |
| 14 | (async () => { |
| 15 | for (const i in PLATFORMS) { |
| 16 | const platform = PLATFORMS[i]; |
| 17 | const pkgCommand = isPreRelease |
| 18 | ? "node scripts/package.js --pre-release --target " + platform // --yarn" |
| 19 | : "node scripts/package.js --target " + platform; // --yarn"; |
| 20 | |
| 21 | execSync( |
| 22 | "node scripts/prepackage-cross-platform.js --target "+ platform, |
| 23 | {stdio: 'inherit'} |
| 24 | |
| 25 | ); |
| 26 | execSync( |
| 27 | pkgCommand, |
| 28 | {stdio: 'inherit'} |
| 29 | ); |
| 30 | } |
| 31 | })(); |
| 32 | |
| 33 | |