diff --git a/script/package-redhat.ts b/script/package-redhat.ts index 37bd3819293..61fe4a1162e 100644 --- a/script/package-redhat.ts +++ b/script/package-redhat.ts @@ -10,7 +10,8 @@ import { getVersion } from '../app/package-info' import { getDistPath, getDistRoot } from './dist-info' function getArchitecture() { - switch (process.arch) { + const arch = process.env.npm_config_arch || process.arch + switch (arch) { case 'arm64': return 'aarch64' case 'arm': @@ -103,7 +104,7 @@ export async function packageRedhat(): Promise { const oldPath = files[0] - const newFileName = `GitHubDesktop-linux-${getVersion()}.rpm` + const newFileName = `GitHubDesktop-linux-${getArchitecture()}-${getVersion()}.rpm` const newPath = join(distRoot, newFileName) await rename(oldPath, newPath)