From adf62dfa875738ddc61919a3ce236ff29335706f Mon Sep 17 00:00:00 2001 From: hensm Date: Sun, 18 Aug 2019 06:26:04 +0100 Subject: [PATCH] Fix naming workaround breaking packaging builds --- app/bin/build.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/app/bin/build.js b/app/bin/build.js index 6dfdb23..6cfe3a6 100644 --- a/app/bin/build.js +++ b/app/bin/build.js @@ -180,17 +180,11 @@ async function build () { fs.writeFileSync(path.join(BUILD_PATH, "package.json") , JSON.stringify(pkgManifest)) - /** - * With the BUILD_PATH/bridge dir, cannot build to - * BUILD_PATH/bridge file. - */ - const tempExecutableName = `_${executableName[argv.platform]}`; - // Run pkg to create a single executable await pkg.exec([ BUILD_PATH , "--target", `${pkgPlatform[argv.platform]}-${argv.arch}` - , "--output", path.join(BUILD_PATH, tempExecutableName) + , "--output", path.join(BUILD_PATH, executableName[argv.platform]) ]); // Build NativeMacReceiverSelector @@ -238,7 +232,7 @@ async function build () { , path.join(DIST_PATH, manifestName) , { overwrite: true }); fs.moveSync( - path.join(BUILD_PATH, tempExecutableName) + path.join(BUILD_PATH, executableName[argv.platform]) , path.join(DIST_PATH, executableName[argv.platform]) , { overwrite: true }); @@ -329,7 +323,7 @@ function packageDarwin ( fs.ensureDirSync(rootManifestPath, { recursive: true }); // Move files to root - fs.moveSync(path.join(BUILD_PATH, `_${platformExecutableName}`) + fs.moveSync(path.join(BUILD_PATH, platformExecutableName) , path.join(rootExecutablePath, platformExecutableName)); fs.moveSync(path.join(BUILD_PATH, manifestName) , path.join(rootManifestPath, manifestName));