File tree Expand file tree Collapse file tree 3 files changed +37
-4
lines changed Expand file tree Collapse file tree 3 files changed +37
-4
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,17 @@ import { rename } from 'fs-extra'
9
9
import { getVersion } from '../app/package-info'
10
10
import { getDistPath , getDistRoot } from './dist-info'
11
11
12
+ function getArchitecture ( ) {
13
+ switch ( process . arch ) {
14
+ case 'arm64' :
15
+ return 'arm64'
16
+ case 'arm' :
17
+ return 'armhf'
18
+ default :
19
+ return 'amd64'
20
+ }
21
+ }
22
+
12
23
const distRoot = getDistRoot ( )
13
24
14
25
// best guess based on documentation
@@ -39,7 +50,7 @@ type DebianOptions = {
39
50
const options : DebianOptions = {
40
51
src : getDistPath ( ) ,
41
52
dest : distRoot ,
42
- arch : 'amd64' ,
53
+ arch : getArchitecture ( ) ,
43
54
description : 'Simple collaboration from your desktop' ,
44
55
productDescription :
45
56
'This is the unofficial port of GitHub Desktop for Linux distributions' ,
Original file line number Diff line number Diff line change @@ -9,6 +9,17 @@ const globPromise = promisify(glob)
9
9
10
10
import { getDistPath , getDistRoot } from './dist-info'
11
11
12
+ function getArchitecture ( ) {
13
+ switch ( process . arch ) {
14
+ case 'arm64' :
15
+ return '--arm64'
16
+ case 'arm' :
17
+ return '--armv7l'
18
+ default :
19
+ return '--x64'
20
+ }
21
+ }
22
+
12
23
export async function packageElectronBuilder ( ) : Promise < Array < string > > {
13
24
const distPath = getDistPath ( )
14
25
const distRoot = getDistRoot ( )
@@ -27,7 +38,7 @@ export async function packageElectronBuilder(): Promise<Array<string>> {
27
38
'build' ,
28
39
'--prepackaged' ,
29
40
distPath ,
30
- '--x64' ,
41
+ getArchitecture ( ) ,
31
42
'--config' ,
32
43
configPath ,
33
44
]
Original file line number Diff line number Diff line change @@ -9,14 +9,25 @@ import { rename } from 'fs-extra'
9
9
import { getVersion } from '../app/package-info'
10
10
import { getDistPath , getDistRoot } from './dist-info'
11
11
12
+ function getArchitecture ( ) {
13
+ switch ( process . arch ) {
14
+ case 'arm64' :
15
+ return 'aarch64'
16
+ case 'arm' :
17
+ return 'armv7l'
18
+ default :
19
+ return 'x86_64'
20
+ }
21
+ }
22
+
12
23
const distRoot = getDistRoot ( )
13
24
14
25
// best guess based on documentation
15
26
type RedhatOptions = {
16
27
// required
17
28
src : string
18
29
dest : string
19
- arch : 'x86_64'
30
+ arch : string
20
31
// optional
21
32
description ?: string
22
33
productDescription ?: string
@@ -36,7 +47,7 @@ type RedhatOptions = {
36
47
const options : RedhatOptions = {
37
48
src : getDistPath ( ) ,
38
49
dest : distRoot ,
39
- arch : 'x86_64' ,
50
+ arch : getArchitecture ( ) ,
40
51
description : 'Simple collaboration from your desktop' ,
41
52
productDescription :
42
53
'This is the unofficial port of GitHub Desktop for Linux distributions' ,
You can’t perform that action at this time.
0 commit comments