Skip to content

Commit

Permalink
fix: publish produced "...armv7l.yml", but updater finds for "...ar…
Browse files Browse the repository at this point in the history
…m.yml"

Close electron-userland#2884
  • Loading branch information
develar committed May 9, 2018
1 parent 4d223bf commit 7b74319
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/electron-builder-lib/src/publish/updateInfoBuilder.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import BluebirdPromise from "bluebird-lst"
import { Arch, hashFile, safeStringifyJson, serializeToYaml, log } from "builder-util"
import { Arch, hashFile, log, safeStringifyJson, serializeToYaml } from "builder-util"
import { GenericServerOptions, GithubOptions, PublishConfiguration, UpdateInfo, WindowsUpdateInfo } from "builder-util-runtime"
import { outputFile, outputJson, readFile } from "fs-extra-p"
import { Lazy } from "lazy-val"
Expand Down Expand Up @@ -57,8 +57,14 @@ function computeChannelNames(packager: PlatformPackager<any>, publishConfig: Pub

function getUpdateInfoFileName(channel: string, packager: PlatformPackager<any>, arch: Arch | null): string {
const osSuffix = packager.platform === Platform.WINDOWS ? "" : `-${packager.platform.buildConfigurationKey}`
const archSuffix = (arch != null && arch !== Arch.x64 && packager.platform === Platform.LINUX) ? `-${Arch[arch]}` : ""
return `${channel}${osSuffix}${archSuffix}.yml`
return `${channel}${osSuffix}${getArchPrefixForUpdateFile(arch, packager)}.yml`
}

function getArchPrefixForUpdateFile(arch: Arch | null, packager: PlatformPackager<any>) {
if (arch == null || arch === Arch.x64 || packager.platform !== Platform.LINUX) {
return ""
}
return arch === Arch.armv7l ? "arm" : Arch[arch]
}

export interface UpdateInfoFileTask {
Expand Down

0 comments on commit 7b74319

Please sign in to comment.