From 9d31b4239f5e293c96e36526b61588919b19dc9b Mon Sep 17 00:00:00 2001 From: develar Date: Sun, 6 Nov 2016 09:12:22 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20github=20as=20a=20provider=20=E2=80=94?= =?UTF-8?q?=20latest.yml=20is=20not=20generated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #868 --- src/targets/nsis.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/targets/nsis.ts b/src/targets/nsis.ts index a684d63d464..41e46ef963f 100644 --- a/src/targets/nsis.ts +++ b/src/targets/nsis.ts @@ -204,14 +204,20 @@ export default class NsisTarget extends TargetEx { const publishConfigs = await this.publishConfigs if (publishConfigs != null) { + const writtenChannels = new Set() 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 = (publishConfig).channel || "latest" + if (writtenChannels.has(channel)) { + continue + } + writtenChannels.add(channel) + await writeFile(path.join(this.outDir, `${channel}.yml`), safeDump({ version: version, path: installerFilename,