From ad1a6560fa80b8265d5807cf4dba7e51fa6056a9 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Thu, 24 Nov 2022 20:58:33 +0700 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D1=86=D0=B5=D0=BB=D0=B8=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D0=B8=20=D1=80=D0=B5=D0=BB=D0=B8?= =?UTF-8?q?=D0=B7=D0=B0=20macos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/prepkg.js | 2 +- build/release.js | 1 + package.json | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build/prepkg.js b/build/prepkg.js index 60f9171..ce9f94a 100644 --- a/build/prepkg.js +++ b/build/prepkg.js @@ -12,7 +12,7 @@ const publicDir = `${tmpDir}/public`; const outDir = `${distDir}/${platform}`; async function build() { - if (platform != 'linux' && platform != 'win') + if (platform != 'linux' && platform != 'win' && platform != 'macos') throw new Error(`Unknown platform: ${platform}`); await fs.emptyDir(outDir); diff --git a/build/release.js b/build/release.js index 9610335..3799773 100644 --- a/build/release.js +++ b/build/release.js @@ -22,6 +22,7 @@ async function main() { await fs.emptyDir(outDir); await makeRelease('win'); await makeRelease('linux'); + await makeRelease('macos'); } catch(e) { console.error(e); process.exit(1); diff --git a/package.json b/package.json index 6f01001..48e40ff 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,9 @@ "build:client": "webpack --config build/webpack.prod.config.js", "build:linux": "npm run build:client && node build/prepkg.js linux && pkg -t node16-linux-x64 -C GZip --options max-old-space-size=4096,expose-gc -o dist/linux/inpx-web .", "build:win": "npm run build:client && node build/prepkg.js win && pkg -t node16-win-x64 -C GZip --options max-old-space-size=4096,expose-gc -o dist/win/inpx-web .", + "build:macos": "npm run build:client && node build/prepkg.js macos && pkg -t node16-macos-x64 -C GZip --options max-old-space-size=4096,expose-gc -o dist/macos/inpx-web .", "build:client-dev": "webpack --config build/webpack.dev.config.js", - "build:all": "npm run build:linux && npm run build:win", + "build:all": "npm run build:linux && npm run build:win && npm run build:macos", "release": "npm run build:all && node build/release.js", "postinstall": "npm run build:client-dev" },