continue-custom/extensions/vscode/scripts/package-all.js
maxxrdrgz 5edc0cba7e
Multi-Build/Package VS Code extensions on single computer. (#1473)
* added try catch on newly added code to buildjs that copies node_sqlite3 to a build directory that may not exist

* fix typo extensioins -> extensions

* added new npm command to build for all platforms

* started adding code to download the ripgrep binaries, will have to finish at a later date

* - added platforms global variable
- added check for --all parameter
- moved alpine check to utils
- moved all packaging code to package()
- added links to esbuild binaries
- chaged code in IIFE to either package for all or package for target

* moved alpine config to utils

* added the code that will download the ripgrep binaries

* added npm run script package-all which will run the package-all.js script

* added package-all script which will package all major builds

* - commented out old downloadEsbuildBinary and rewrote it
- finished the downloadRipgrepBinary() and exported it

* - added back some of the old code to make this script reusable
- commented out the esbuild download and install in favor of downloading the prebuilt binary
- download the ripgrep binary
- containerized the all of the package code into package() and call it in the IIFE

* added a check for the --target flag and append it to the vsce command

* removed unused variable
2024-06-14 10:43:31 -07:00

33 lines
No EOL
764 B
JavaScript

const { execSync } = require("child_process");
const PLATFORMS = [
"win32-x64",
// "win32-arm64", can't be built due to no sqlite3 binaries
"linux-x64",
"linux-arm64",
"darwin-x64",
"darwin-arm64",
]
const args = process.argv.slice(2);
const isPreRelease = args.includes("--pre-release");
(async () => {
for (const i in PLATFORMS) {
const platform = PLATFORMS[i];
const pkgCommand = isPreRelease
? "node scripts/package.js --pre-release --target " + platform // --yarn"
: "node scripts/package.js --target " + platform; // --yarn";
execSync(
"node scripts/prepackage-cross-platform.js --target "+ platform,
{stdio: 'inherit'}
);
execSync(
pkgCommand,
{stdio: 'inherit'}
);
}
})();