Skip to content

Commit

Permalink
fix: github as a provider — latest.yml is not generated
Browse files Browse the repository at this point in the history
Closes #868
  • Loading branch information
develar committed Nov 6, 2016
1 parent f4728c3 commit 9d31b42
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/targets/nsis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,20 @@ export default class NsisTarget extends TargetEx {

const publishConfigs = await this.publishConfigs
if (publishConfigs != null) {
const writtenChannels = new Set<string>()
let sha2: string | null = null
for (let publishConfig of publishConfigs) {
if (publishConfig.provider === "generic") {
if (publishConfig.provider === "generic" || publishConfig.provider === "github") {
if (sha2 == null) {
sha2 = await sha256(installerPath)
}

const channel = (<GenericServerOptions>publishConfig).channel || "latest"
if (writtenChannels.has(channel)) {
continue
}
writtenChannels.add(channel)

await writeFile(path.join(this.outDir, `${channel}.yml`), safeDump(<UpdateInfo>{
version: version,
path: installerFilename,
Expand Down

0 comments on commit 9d31b42

Please sign in to comment.