From e5e0782c149df392417cf2a8eb588b901b1764bd Mon Sep 17 00:00:00 2001 From: develar Date: Mon, 5 Mar 2018 08:40:05 +0100 Subject: [PATCH] fix: CSC_LINK is ignored on Windows Close #2639 --- package.json | 2 +- packages/builder-util/package.json | 2 +- packages/electron-builder-lib/package.json | 2 +- .../src/platformPackager.ts | 5 ++-- yarn.lock | 30 +++++++++---------- 5 files changed, 21 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index 8ecfe67b522..360c72b5262 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "////": "All typings are added into root `package.json` to avoid duplication errors in the IDE compiler (several `node.d.ts` files).", "dependencies": { "7zip-bin": "~3.1.0", - "app-builder-bin": "1.5.1", + "app-builder-bin": "1.6.0", "archiver": "^2.1.1", "async-exit-hook": "^2.0.1", "aws-sdk": "^2.205.0", diff --git a/packages/builder-util/package.json b/packages/builder-util/package.json index d948d159275..51e87987537 100644 --- a/packages/builder-util/package.json +++ b/packages/builder-util/package.json @@ -11,7 +11,7 @@ "out" ], "dependencies": { - "app-builder-bin": "1.5.1", + "app-builder-bin": "1.6.0", "temp-file": "^3.1.1", "fs-extra-p": "^4.5.2", "is-ci": "^1.1.0", diff --git a/packages/electron-builder-lib/package.json b/packages/electron-builder-lib/package.json index 03370f4a4fb..d85ab3abe49 100644 --- a/packages/electron-builder-lib/package.json +++ b/packages/electron-builder-lib/package.json @@ -42,7 +42,7 @@ "homepage": "https://github.com/electron-userland/electron-builder", "dependencies": { "7zip-bin": "~3.1.0", - "app-builder-bin": "1.5.1", + "app-builder-bin": "1.6.0", "async-exit-hook": "^2.0.1", "bluebird-lst": "^1.0.5", "chromium-pickle-js": "^0.2.0", diff --git a/packages/electron-builder-lib/src/platformPackager.ts b/packages/electron-builder-lib/src/platformPackager.ts index 2c635b489e5..f64bd0905e6 100644 --- a/packages/electron-builder-lib/src/platformPackager.ts +++ b/packages/electron-builder-lib/src/platformPackager.ts @@ -89,9 +89,10 @@ export abstract class PlatformPackager } } - protected getCscLink(envName: string = "CSC_LINK"): string | null | undefined { + protected getCscLink(extraEnvName?: string | null): string | null | undefined { // allow to specify as empty string - return chooseNotNull(chooseNotNull(this.info.config.cscLink, this.platformSpecificBuildOptions.cscLink), process.env[envName]) + const envValue = chooseNotNull(extraEnvName == null ? null : process.env[extraEnvName], process.env.CSC_LINK) + return chooseNotNull(chooseNotNull(this.info.config.cscLink, this.platformSpecificBuildOptions.cscLink), envValue) } protected doGetCscPassword(): string | null | undefined { diff --git a/yarn.lock b/yarn.lock index cc476c2148d..f9491998db4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -275,25 +275,25 @@ anymatch@^1.3.0: micromatch "^2.1.5" normalize-path "^2.0.0" -app-builder-bin-linux@1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/app-builder-bin-linux/-/app-builder-bin-linux-1.5.1.tgz#452feffa1a31834e4d8be2add078ab222e655e73" +app-builder-bin-linux@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/app-builder-bin-linux/-/app-builder-bin-linux-1.6.0.tgz#d7731d7988b8a740e74d591cbd565f168a266111" -app-builder-bin-mac@1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/app-builder-bin-mac/-/app-builder-bin-mac-1.5.1.tgz#8f989f047b7f149c8e0f3adfb9e914f0ad26a16a" +app-builder-bin-mac@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/app-builder-bin-mac/-/app-builder-bin-mac-1.6.0.tgz#c976da70796d67aeb7134a57899636f2581d1c67" -app-builder-bin-win@1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/app-builder-bin-win/-/app-builder-bin-win-1.5.1.tgz#03fa63c628b577cc3cea3668bf197f286d5d3e6c" +app-builder-bin-win@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/app-builder-bin-win/-/app-builder-bin-win-1.6.0.tgz#528ef96430d519c270b4de260bea0ddc70df1733" -app-builder-bin@1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/app-builder-bin/-/app-builder-bin-1.5.1.tgz#30e4a151dfff1e4dc69e5f87062d7f1f686e6389" +app-builder-bin@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/app-builder-bin/-/app-builder-bin-1.6.0.tgz#c0e88a488d4c23c2e7fe0bbfb70c1d61165be206" optionalDependencies: - app-builder-bin-linux "1.5.1" - app-builder-bin-mac "1.5.1" - app-builder-bin-win "1.5.1" + app-builder-bin-linux "1.6.0" + app-builder-bin-mac "1.6.0" + app-builder-bin-win "1.6.0" append-transform@^0.4.0: version "0.4.0"