Changesets · Branches · Tags · Compare
| Changeset | f01d551dde94a947320ee24aad75251bf1c85b5af0bebef8a4565abd64c31605 |
|---|---|
| Author | Dallin Romney <dallinromney@gmail.com> · 2025-07-10 15:26 -07:00 |
| Committer | GitHub <noreply@github.com> · 2025-07-10 15:26 -07:00 |
| Parents | 0db1b6ee73ae, 548b15e845f2 |
2 files changed
modified extensions/vscode/scripts/package-all.js +2 −1
| @@ -11,7 +11,7 @@ | ||
| 11 | 11 | const args = process.argv.slice(2); |
| 12 | 12 | const isPreRelease = args.includes("--pre-release"); |
| 13 | 13 | |
| 14 | -(async () => { | |
| 14 | +void (async () => { | |
| 15 | 15 | for (const i in PLATFORMS) { |
| 16 | 16 | const platform = PLATFORMS[i]; |
| 17 | 17 | const pkgCommand = isPreRelease |
| @@ -23,4 +23,5 @@ | ||
| 23 | 23 | }); |
| 24 | 24 | execSync(pkgCommand, { stdio: "inherit" }); |
| 25 | 25 | } |
| 26 | + process.exit(0); | |
| 26 | 27 | })(); |
modified extensions/vscode/scripts/prepackage-cross-platform.js +11 −19
| @@ -6,14 +6,17 @@ | ||
| 6 | 6 | |
| 7 | 7 | const fs = require("fs"); |
| 8 | 8 | const path = require("path"); |
| 9 | + | |
| 9 | 10 | const { rimrafSync } = require("rimraf"); |
| 11 | + | |
| 10 | 12 | const { |
| 11 | 13 | validateFilesPresent, |
| 12 | 14 | autodetectPlatformAndArch, |
| 13 | 15 | } = require("../../../scripts/util/index"); |
| 16 | + | |
| 17 | +const { generateAndCopyConfigYamlSchema } = require("./generate-copy-config"); | |
| 18 | +const { npmInstall } = require("./npm-install"); | |
| 14 | 19 | const { |
| 15 | - copyConfigSchema, | |
| 16 | - installNodeModules, | |
| 17 | 20 | buildGui, |
| 18 | 21 | copyOnnxRuntimeFromNodeModules, |
| 19 | 22 | copyTreeSitterWasms, |
| @@ -48,10 +51,10 @@ | ||
| 48 | 51 | |
| 49 | 52 | let os; |
| 50 | 53 | let arch; |
| 51 | -if (!target) { | |
| 52 | - [os, arch] = autodetectPlatformAndArch(); | |
| 53 | -} else { | |
| 54 | +if (target) { | |
| 54 | 55 | [os, arch] = target.split("-"); |
| 56 | +} else { | |
| 57 | + [os, arch] = autodetectPlatformAndArch(); | |
| 55 | 58 | } |
| 56 | 59 | |
| 57 | 60 | if (os === "alpine") { |
| @@ -71,26 +74,14 @@ | ||
| 71 | 74 | return !!process.env.GITHUB_ACTIONS; |
| 72 | 75 | } |
| 73 | 76 | |
| 74 | -function isArm() { | |
| 75 | - return ( | |
| 76 | - target === "darwin-arm64" || | |
| 77 | - target === "linux-arm64" || | |
| 78 | - target === "win32-arm64" | |
| 79 | - ); | |
| 80 | -} | |
| 81 | - | |
| 82 | -function isWin() { | |
| 83 | - return target?.startsWith("win"); | |
| 84 | -} | |
| 85 | - | |
| 86 | 77 | async function package(target, os, arch, exe) { |
| 87 | 78 | console.log("[info] Packaging extension for target ", target); |
| 88 | 79 | |
| 89 | 80 | // Copy config_schema to intellij |
| 90 | - copyConfigSchema(); | |
| 81 | + await generateAndCopyConfigYamlSchema(); | |
| 91 | 82 | |
| 92 | 83 | // Install node_modules |
| 93 | - installNodeModules(); | |
| 84 | + await npmInstall(); | |
| 94 | 85 | |
| 95 | 86 | // Build gui and copy to extensions |
| 96 | 87 | await buildGui(ghAction()); |
| @@ -214,4 +205,5 @@ | ||
| 214 | 205 | |
| 215 | 206 | void (async () => { |
| 216 | 207 | await package(target, os, arch, exe); |
| 208 | + process.exit(0); | |
| 217 | 209 | })(); |