diff --git a/bin/package.js b/bin/package.js index ea7afb8c..81ff3b03 100755 --- a/bin/package.js +++ b/bin/package.js @@ -485,12 +485,7 @@ function buildLinux (cb) { const tasks = [] buildPath.forEach(function (filesPath) { - let destArch = filesPath.split('-').pop() - - // Linux convention for 'x64' is 'amd64' - if (destArch === 'x64') { - destArch = 'amd64' - } + const destArch = filesPath.split('-').pop() if (argv.package === 'deb' || argv.package === 'all') { tasks.push((cb) => packageDeb(filesPath, destArch, cb)) @@ -508,6 +503,11 @@ function buildLinux (cb) { }) function packageDeb (filesPath, destArch, cb) { + // Linux convention for Debian based 'x64' is 'amd64' + if (destArch === 'x64') { + destArch = 'amd64' + } + // Create .deb file for Debian-based platforms console.log(`Linux: Creating ${destArch} deb...`) @@ -537,6 +537,11 @@ function buildLinux (cb) { } function packageRpm (filesPath, destArch, cb) { + // Linux convention for RedHat based 'x64' is 'x86_64' + if (destArch === 'x64') { + destArch = 'x86_64' + } + // Create .rpm file for RedHat-based platforms console.log(`Linux: Creating ${destArch} rpm...`) diff --git a/package.json b/package.json index 2a93630c..6db88aa2 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "build": "buble src --target chrome:71 --output build", "clean": "node ./bin/clean.js", "gh-release": "gh-release", - "install-system-deps": "brew install fakeroot dpkg rpmbuild", + "install-system-deps": "brew install fakeroot dpkg rpm", "open-config": "node ./bin/open-config.js", "package": "node ./bin/package.js", "start": "npm run build && electron .",