packge all linux versions (#379)
This commit is contained in:
committed by
Feross Aboukhadijeh
parent
c98f3cd040
commit
e75cd45ec0
@@ -295,7 +295,10 @@ function buildLinux (packageType, cb) {
|
|||||||
if (err) return cb(err)
|
if (err) return cb(err)
|
||||||
|
|
||||||
var distPath = path.join(config.ROOT_PATH, 'dist')
|
var distPath = path.join(config.ROOT_PATH, 'dist')
|
||||||
var filesPath = buildPath[0]
|
|
||||||
|
for (var i = 0; i < buildPath.length; i++) {
|
||||||
|
var filesPath = buildPath[i]
|
||||||
|
var destArch = filesPath.split('-').pop()
|
||||||
|
|
||||||
if (packageType === 'deb' || packageType === 'all') {
|
if (packageType === 'deb' || packageType === 'all') {
|
||||||
// Create .deb file for debian based platforms
|
// Create .deb file for debian based platforms
|
||||||
@@ -305,7 +308,7 @@ function buildLinux (packageType, cb) {
|
|||||||
deb.pack({
|
deb.pack({
|
||||||
package: pkg,
|
package: pkg,
|
||||||
info: {
|
info: {
|
||||||
arch: 'amd64',
|
arch: destArch === 'x64' ? 'amd64' : 'i386',
|
||||||
targetDir: distPath,
|
targetDir: distPath,
|
||||||
depends: 'libc6 (>= 2.4)',
|
depends: 'libc6 (>= 2.4)',
|
||||||
scripts: {
|
scripts: {
|
||||||
@@ -320,16 +323,17 @@ function buildLinux (packageType, cb) {
|
|||||||
cwd: filesPath
|
cwd: filesPath
|
||||||
}], function (err, done) {
|
}], function (err, done) {
|
||||||
if (err) return console.error(err.message || err)
|
if (err) return console.error(err.message || err)
|
||||||
console.log('Created Linux .deb file.')
|
console.log('Created Linux ' + destArch + ' .deb file.')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (packageType === 'zip' || packageType === 'all') {
|
if (packageType === 'zip' || packageType === 'all') {
|
||||||
// Create .zip file for Linux
|
// Create .zip file for Linux
|
||||||
var zipPath = path.join(config.ROOT_PATH, 'dist', BUILD_NAME + '-linux.zip')
|
var zipPath = path.join(config.ROOT_PATH, 'dist', BUILD_NAME + '-linux-' + destArch + '.zip')
|
||||||
var appFolderName = path.basename(filesPath)
|
var appFolderName = path.basename(filesPath)
|
||||||
cp.execSync(`cd ${distPath} && zip -r -y ${zipPath} ${appFolderName}`)
|
cp.execSync(`cd ${distPath} && zip -r -y ${zipPath} ${appFolderName}`)
|
||||||
console.log('Created Linux .zip file.')
|
console.log('Created Linux ' + destArch + ' .zip file.')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
"electron-packager": "electron-userland/electron-packager",
|
"electron-packager": "electron-userland/electron-packager",
|
||||||
"electron-winstaller": "feross/windows-installer#build",
|
"electron-winstaller": "feross/windows-installer#build",
|
||||||
"gh-release": "^2.0.3",
|
"gh-release": "^2.0.3",
|
||||||
"nobin-debian-installer": "^0.0.8",
|
"nobin-debian-installer": "^0.0.9",
|
||||||
"plist": "^1.2.0",
|
"plist": "^1.2.0",
|
||||||
"standard": "^6.0.5"
|
"standard": "^6.0.5"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user