Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
67 lines (53 loc) · 1.45 KB

File metadata and controls

67 lines (53 loc) · 1.45 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* eslint-disable no-sync */
import * as path from 'path'
import * as cp from 'child_process'
import { promisify } from 'util'
import glob = require('glob')
const globPromise = promisify(glob)
import { getDistPath, getDistRoot } from './dist-info'
function getArchitecture() {
const arch = process.env.npm_config_arch || process.arch
switch (arch) {
case 'arm64':
return '--arm64'
case 'arm':
return '--armv7l'
default:
return '--x64'
}
}
export async function packageElectronBuilder(): Promise<Array<string>> {
const distPath = getDistPath()
const distRoot = getDistRoot()
const electronBuilder = path.resolve(
__dirname,
'..',
'node_modules',
'.bin',
'electron-builder'
)
const configPath = path.resolve(__dirname, 'electron-builder-linux.yml')
const args = [
'build',
'--prepackaged',
distPath,
getArchitecture(),
'--config',
configPath,
]
const { error } = cp.spawnSync(electronBuilder, args, { stdio: 'inherit' })
if (error != null) {
return Promise.reject(error)
}
const appImageInstaller = `${distRoot}/GitHubDesktop-linux-*.AppImage`
const files = await globPromise(appImageInstaller)
if (files.length !== 1) {
return Promise.reject(
`Expected one AppImage installer but instead found '${files.join(
', '
)}' - exiting...`
)
}
const appImageInstallerPath = files[0]
return Promise.resolve([appImageInstallerPath])
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.