Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions script/package-debian.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,25 @@ import { getDistPath, getDistRoot } from './dist-info'

const distRoot = getDistRoot()

let arch_deb
switch (process.arch) {
case 'x64':
arch_deb = 'amd64'
break
case 'arm':
arch_deb = 'armhf'
break
case 'arm64':
arch_deb = 'arm64'
break
}

// best guess based on documentation
type DebianOptions = {
// required
src: string
dest: string
arch: 'amd64' | 'i386' | 'arm64' | 'armhf'
arch: string
// optional
description?: string
productDescription?: string
Expand All @@ -39,7 +52,7 @@ type DebianOptions = {
const options: DebianOptions = {
src: getDistPath(),
dest: distRoot,
arch: 'amd64',
arch: `${arch_deb}`,
description: 'Simple collaboration from your desktop',
productDescription:
'This is the unofficial port of GitHub Desktop for Linux distributions',
Expand Down
20 changes: 19 additions & 1 deletion script/package-electron-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,24 @@ const globPromise = promisify(glob)

import { getDistPath, getDistRoot } from './dist-info'

let arch_appimage = ''
switch (process.arch) {
case 'x64':
console.log('This is an x86_64 system')
arch_appimage = '--x64'
break
case 'arm':
console.log('This is an ARM32 system')
arch_appimage = '--armv7l'
break
case 'arm64':
console.log('This is an ARM64 system')
arch_appimage = '--arm64'
break
default:
console.log('This architecture is unknown or not supported.')
}

export async function packageElectronBuilder(): Promise<Array<string>> {
const distPath = getDistPath()
const distRoot = getDistRoot()
Expand All @@ -27,7 +45,7 @@ export async function packageElectronBuilder(): Promise<Array<string>> {
'build',
'--prepackaged',
distPath,
'--x64',
`${arch_appimage}`,
'--config',
configPath,
]
Expand Down
17 changes: 15 additions & 2 deletions script/package-redhat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,25 @@ import { getDistPath, getDistRoot } from './dist-info'

const distRoot = getDistRoot()

let arch_rpm = ''
switch (process.arch) {
case 'x64':
arch_rpm = 'x86_64'
break
case 'arm':
arch_rpm = 'armv7l'
break
case 'arm64':
arch_rpm = 'aarch64'
break
}

// best guess based on documentation
type RedhatOptions = {
// required
src: string
dest: string
arch: 'x86_64'
arch: string
// optional
description?: string
productDescription?: string
Expand All @@ -36,7 +49,7 @@ type RedhatOptions = {
const options: RedhatOptions = {
src: getDistPath(),
dest: distRoot,
arch: 'x86_64',
arch: `${arch_rpm}`,
description: 'Simple collaboration from your desktop',
productDescription:
'This is the unofficial port of GitHub Desktop for Linux distributions',
Expand Down