Set correct architecture for RedHat based packages

This commit is contained in:
Julen Garcia Leunda
2019-09-18 19:57:45 +02:00
parent cfa1ebbea7
commit 6e69e5d36e
2 changed files with 12 additions and 7 deletions

View File

@@ -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...`)

View File

@@ -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 .",