Skip to content

Commit

Permalink
fix: identity = null is not respected
Browse files Browse the repository at this point in the history
Close #1233
  • Loading branch information
develar committed Feb 10, 2017
1 parent 7041b5d commit 3df2638
Show file tree
Hide file tree
Showing 6 changed files with 212 additions and 28 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"lerna": "2.0.0-beta.32",
"lerna": "2.0.0-beta.37",
"packages": [
"packages/*"
],
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"whitespace": "whitespace 'src/**/*.ts'",
"docker-images": "docker/build.sh",
"test-deps-mac": "brew install rpm dpkg mono lzip gnu-tar graphicsmagick xz && brew install wine --without-x11",
"update-deps": "lerna exec -- npm-check-updates --reject 'electron-builder-http,electron-builder-util,electron-builder-core' -a",
"update-deps": "lerna exec -- npm-check-updates --reject 'electron-builder-http,electron-builder-util,electron-builder-core,electron-builder-publisher' -a",
"lerna-publish": "node test/out/helpers/setVersions.js p && lerna publish --skip-npm --skip-git && node test/out/helpers/setVersions.js",
"npm-publish": "yarn compile && ./packages/npm-publish.sh && conventional-changelog -p angular -i CHANGELOG.md -s"
},
Expand All @@ -25,7 +25,7 @@
"7zip-bin": "^2.0.4",
"archiver": "^1.3.0",
"asar-electron-builder": "^0.13.5",
"aws-sdk": "^2.10.0",
"aws-sdk": "^2.11.0",
"bluebird-lst-c": "^1.0.6",
"chalk": "^1.1.3",
"chromium-pickle-js": "^0.2.0",
Expand Down Expand Up @@ -54,7 +54,7 @@
"yargs": "^6.6.0"
},
"devDependencies": {
"@types/electron": "^1.4.31",
"@types/electron": "^1.4.32",
"@types/ini": "^1.3.29",
"@types/jest": "^18.1.1",
"@types/js-yaml": "^3.5.29",
Expand All @@ -72,6 +72,7 @@
"electron-download-tf": "3.2.0",
"jest-cli": "^18.1.0",
"jest-environment-node-debug": "^0.0.2",
"lerna": "2.0.0-beta.37",
"path-sort": "^0.1.0",
"source-map-support": "^0.4.11",
"ts-babel": "^1.3.6",
Expand Down
10 changes: 10 additions & 0 deletions packages/electron-builder/src/macPackager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { PkgTarget, prepareProductBuildArgs } from "./targets/pkg"
import { exec } from "electron-builder-util"
import { Target, Platform, Arch } from "electron-builder-core"
import { BuildInfo } from "./packagerApi"
import { log } from "electron-builder-util/out/log"

export default class MacPackager extends PlatformPackager<MacOptions> {
readonly codeSigningInfo: Promise<CodeSigningInfo>
Expand Down Expand Up @@ -115,6 +116,15 @@ export default class MacPackager extends PlatformPackager<MacOptions> {
const keychainName = (await this.codeSigningInfo).keychainName
const isMas = masOptions != null
const qualifier = this.platformSpecificBuildOptions.identity

if (!isMas && qualifier === null) {
if (this.forceCodeSigning) {
throw new Error("identity explicitly is set to null, but forceCodeSigning is set to true")
}
log("identity explicitly is set to null, skipping macOS application code signing.")
return
}

const masQualifier = isMas ? (masOptions!!.identity || qualifier) : null

const explicitType = masOptions == null ? this.platformSpecificBuildOptions.type : masOptions.type
Expand Down
2 changes: 1 addition & 1 deletion packages/electron-publisher-s3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"dependencies": {
"fs-extra-p": "^3.1.0",
"aws-sdk": "^2.10.0",
"aws-sdk": "^2.11.0",
"mime": "^1.3.4",
"bluebird-lst-c": "^1.0.6",
"electron-builder-publisher": "~0.0.0-semantic-release",
Expand Down
5 changes: 0 additions & 5 deletions packages/electron-updater/src/electronHttpExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ export class ElectronHttpExecutor extends HttpExecutor<Electron.RequestOptions,
}

doApiRequest<T>(options: Electron.RequestOptions, cancellationToken: CancellationToken, requestProcessor: (request: Electron.ClientRequest, reject: (error: Error) => void) => void, redirectCount: number = 0): Promise<T> {
if (<any>options.Protocol != null) {
// electron typings defines it as incorrect Protocol (uppercase P)
(<any>options).protocol = options.Protocol
}

if (this.debug.enabled) {
this.debug(`request: ${dumpRequestOptions(options)}`)
}
Expand Down
Loading

0 comments on commit 3df2638

Please sign in to comment.