|
| 1 | +diff --git a/lib/commands/pack/win.js b/lib/commands/pack/win.js |
| 2 | +index 9a255a011cbbfb34a337f67bcbabbbffdaf65c11..59cdbd47450e659317bdb9deee18c015d4a41ed3 100644 |
| 3 | +--- a/lib/commands/pack/win.js |
| 4 | ++++ b/lib/commands/pack/win.js |
| 5 | +@@ -332,7 +332,9 @@ the CLI should already exist in a directory named after the CLI that is the root |
| 6 | + : []), |
| 7 | + ]); |
| 8 | + await (0, fs_extra_1.move)(buildConfig.workspace({ arch, platform: 'win32' }), node_path_1.default.join(installerBase, 'client')); |
| 9 | +- await exec(`makensis "${installerBase}/${config.bin}.nsi" | grep -v "\\[compress\\]" | grep -v "^File: Descending to"`); |
| 10 | ++ await exec(`makensis "${config.bin}.nsi" | grep -v "\\[compress\\]" | grep -v "^File: Descending to"`, { |
| 11 | ++ cwd: installerBase, |
| 12 | ++ }); |
| 13 | + const templateKey = (0, upload_util_1.templateShortKey)('win32', { |
| 14 | + arch, |
| 15 | + bin: config.bin, |
| 16 | +@@ -340,7 +342,11 @@ the CLI should already exist in a directory named after the CLI that is the root |
| 17 | + version: config.version, |
| 18 | + }); |
| 19 | + const o = buildConfig.dist(`win32/${templateKey}`); |
| 20 | +- await (0, fs_extra_1.move)(node_path_1.default.join(installerBase, 'installer.exe'), o); |
| 21 | ++ const installerPath = node_path_1.default.join(installerBase, 'installer.exe'); |
| 22 | ++ if (!(await (0, fs_extra_1.pathExists)(installerPath))) { |
| 23 | ++ throw new Error(`NSIS did not output installer.exe in ${installerBase}`); |
| 24 | ++ } |
| 25 | ++ await (0, fs_extra_1.move)(installerPath, o); |
| 26 | + const { windows } = config.pjson.oclif; |
| 27 | + if (windows && windows.name && windows.keypath) { |
| 28 | + await signWindows(o, arch, config, windows); |
| 29 | +diff --git a/lib/tarballs/build.js b/lib/tarballs/build.js |
| 30 | +index cbae61146324ef6ac0935c625b7858007ac238d1..4351bc8681601017e590fd862c0944e34e3d2a7f 100644 |
| 31 | +--- a/lib/tarballs/build.js |
| 32 | ++++ b/lib/tarballs/build.js |
| 33 | +@@ -69,9 +69,23 @@ const copyCoreYarnFiles = async (yarnRootPath, workspacePath) => { |
| 34 | + }; |
| 35 | + async function build(c, options = {}) { |
| 36 | + (0, log_1.log)(`gathering workspace for ${c.config.bin} to ${c.workspace()}`); |
| 37 | +- await extractCLI(options.tarball ?? (await packCLI(c)), c); |
| 38 | +- await updatePJSON(c); |
| 39 | +- await addDependencies(c); |
| 40 | ++ if (true) { |
| 41 | ++ try { |
| 42 | ++ (0, log_1.log)('emptying', node_path_1.default.join(c.workspace())); |
| 43 | ++ node_fs_1.rmSync(node_path_1.default.join(c.workspace()), { force: true, recursive: true }); |
| 44 | ++ await exec(`pnpm --filter . deploy --prod --legacy ${c.workspace()}`, { cwd: c.root }); |
| 45 | ++ } |
| 46 | ++ catch (e) { |
| 47 | ++ (0, log_1.log)(e); |
| 48 | ++ throw e; |
| 49 | ++ } |
| 50 | ++ await updatePJSON(c); |
| 51 | ++ } |
| 52 | ++ else { |
| 53 | ++ await extractCLI(options.tarball ?? (await packCLI(c)), c); |
| 54 | ++ await updatePJSON(c); |
| 55 | ++ await addDependencies(c); |
| 56 | ++ } |
| 57 | + await (0, bin_1.writeBinScripts)({ |
| 58 | + baseWorkspace: c.workspace(), |
| 59 | + config: c.config, |
| 60 | +@@ -159,10 +173,11 @@ const addDependencies = async (c) => { |
| 61 | + } |
| 62 | + } |
| 63 | + } |
| 64 | +- else if ((0, node_fs_1.existsSync)(node_path_1.default.join(c.root, 'pnpm-lock.yaml'))) { |
| 65 | +- await (0, fs_extra_1.copy)(node_path_1.default.join(c.root, 'pnpm-lock.yaml'), node_path_1.default.join(c.workspace(), 'pnpm-lock.yaml')); |
| 66 | +- await exec('pnpm install --production', { cwd: c.workspace() }); |
| 67 | +- } |
| 68 | ++ // Not needed since we use pnpm deploy |
| 69 | ++ // else if ((0, node_fs_1.existsSync)(node_path_1.default.join(c.root, '..' ,'pnpm-lock.yaml'))) { |
| 70 | ++ // await (0, fs_extra_1.copy)(node_path_1.default.join(c.root, '..', 'pnpm-lock.yaml'), node_path_1.default.join(c.workspace(), 'pnpm-lock.yaml')); |
| 71 | ++ // await exec('pnpm install --production', { cwd: c.workspace() }); |
| 72 | ++ // } |
| 73 | + else { |
| 74 | + const lockpath = (0, node_fs_1.existsSync)(node_path_1.default.join(c.root, 'package-lock.json')) |
| 75 | + ? node_path_1.default.join(c.root, 'package-lock.json') |
0 commit comments