Skip to content

Commit

Permalink
fix: update redhat config to support different architectures (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftkey committed Sep 2, 2024
1 parent 54835bd commit c34ea2b
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions script/package-redhat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,25 @@ import { rename } from 'fs-extra'
import { getVersion } from '../app/package-info'
import { getDistPath, getDistRoot } from './dist-info'

function getArchitecture() {
switch (process.arch) {
case 'arm64':
return 'aarch64'
case 'arm':
return 'armv7l'
default:
return 'x86_64'
}
}

const distRoot = getDistRoot()

// 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 +47,7 @@ type RedhatOptions = {
const options: RedhatOptions = {
src: getDistPath(),
dest: distRoot,
arch: 'x86_64',
arch: getArchitecture(),
description: 'Simple collaboration from your desktop',
productDescription:
'This is the unofficial port of GitHub Desktop for Linux distributions',
Expand Down

0 comments on commit c34ea2b

Please sign in to comment.