From 94ffb78456439e900072a68d04ed74e13106f02f Mon Sep 17 00:00:00 2001 From: SrGooglo Date: Thu, 27 Apr 2023 22:10:38 +0000 Subject: [PATCH] return `outPath` if `--noCompress` --- scripts/release.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/release.js b/scripts/release.js index db5cdb12..7a301f4e 100755 --- a/scripts/release.js +++ b/scripts/release.js @@ -67,16 +67,16 @@ async function createAppDistBundle() { } async function compressDistBundle() { + const outPath = path.resolve(appDistPath, "../app_dist.7z") + if (process.argv.includes("--noCompress") || process.argv.includes("--noBuild")) { console.log("🔥 Skipping compress due to `noBuild` or `noCompress` argument") - return true + return outPath } // compress with 7zip console.log("⚒ Compressing app...") - const outPath = path.resolve(appDistPath, "../app_dist.7z") - // check if out file exists if (fs.existsSync(outPath)) { fs.unlinkSync(outPath) @@ -208,7 +208,7 @@ async function main() { const bundlePath = await compressDistBundle() const changelog = await composeChangelog() - + const changelogFilepath = path.resolve(changelogsPath, `v${currentVersion.split(".").join("-")}.md`) console.log(`📝 Writing changelog to file > ${changelogFilepath}`)