Skip to content

Commit

Permalink
fix: entitlements file names according to new electron-osx-sign conve…
Browse files Browse the repository at this point in the history
…ntions

BREAKING CHANGES: See new entitlements paths in the wiki
  • Loading branch information
develar committed Jun 2, 2016
1 parent b85ddfe commit ecdff3c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions docs/Options.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ See all [appdmg options](https://www.npmjs.com/package/appdmg#json-specification
| background | <a name="OsXBuildOptions-background"></a><p>The path to background (default: <code>build/background.png</code> if exists). The resolution of this file determines the resolution of the installer window. If background is not specified, use <code>window.size</code>, see [specification](/~https://github.com/LinusU/node-appdmg#json-specification).</p>
| target | <a name="OsXBuildOptions-target"></a>Target package type: list of `default`, `dmg`, `mas`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`. Defaults to `default` (dmg and zip for Squirrel.Mac).
| identity | <a name="OsXBuildOptions-identity"></a><p>The name of certificate to use when signing. Consider using environment variables [CSC_LINK or CSC_NAME](/~https://github.com/electron-userland/electron-builder/wiki/Code-Signing). MAS installer identity is specified in the [.build.mas](#MasBuildOptions-identity).</p>
| entitlements | <a name="OsXBuildOptions-entitlements"></a><p>The path to entitlements file for signing the app. <code>build/osx.entitlements</code> will be used if exists (it is a recommended way to set). MAS entitlements is specified in the [.build.mas](#MasBuildOptions-entitlements).</p>
| entitlementsInherit | <a name="OsXBuildOptions-entitlementsInherit"></a><p>The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. <code>build/osx.inherit.entitlements</code> will be used if exists (it is a recommended way to set). Otherwise [default](/~https://github.com/electron-userland/electron-osx-sign/blob/master/default.darwin.inherit.entitlements).</p> <p>This option only applies when signing with <code>entitlements</code> provided.</p>
| entitlements | <a name="OsXBuildOptions-entitlements"></a><p>The path to entitlements file for signing the app. <code>build/entitlements.osx.plist</code> will be used if exists (it is a recommended way to set). MAS entitlements is specified in the [.build.mas](#MasBuildOptions-entitlements).</p>
| entitlementsInherit | <a name="OsXBuildOptions-entitlementsInherit"></a><p>The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. <code>build/entitlements.osx.inherit.plist</code> will be used if exists (it is a recommended way to set). Otherwise [default](/~https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.darwin.inherit.plist).</p> <p>This option only applies when signing with <code>entitlements</code> provided.</p>

<a name="MasBuildOptions"></a>
### `.build.mas`
Expand All @@ -85,8 +85,8 @@ MAS (Mac Application Store) specific options (in addition to `build.osx`).

| Name | Description
| --- | ---
| entitlements | <a name="MasBuildOptions-entitlements"></a><p>The path to entitlements file for signing the app. <code>build/mas.entitlements</code> will be used if exists (it is a recommended way to set). Otherwise [default](/~https://github.com/electron-userland/electron-osx-sign/blob/master/default.mas.entitlements).</p>
| entitlementsInherit | <a name="MasBuildOptions-entitlementsInherit"></a><p>The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. <code>build/mas.inherit.entitlements</code> will be used if exists (it is a recommended way to set). Otherwise [default](/~https://github.com/electron-userland/electron-osx-sign/blob/master/default.mas.inherit.entitlements).</p>
| entitlements | <a name="MasBuildOptions-entitlements"></a><p>The path to entitlements file for signing the app. <code>build/entitlements.mas.plist</code> will be used if exists (it is a recommended way to set). Otherwise [default](/~https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.mas.plist).</p>
| entitlementsInherit | <a name="MasBuildOptions-entitlementsInherit"></a><p>The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. <code>build/entitlements.mas.inherit.plist</code> will be used if exists (it is a recommended way to set). Otherwise [default](/~https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.mas.inherit.plist).</p>

<a name="WinBuildOptions"></a>
### `.build.win`
Expand Down
14 changes: 7 additions & 7 deletions src/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,14 @@ export interface OsXBuildOptions extends PlatformSpecificBuildOptions {
readonly identity?: string | null

/*
The path to entitlements file for signing the app. `build/osx.entitlements` will be used if exists (it is a recommended way to set).
The path to entitlements file for signing the app. `build/entitlements.osx.plist` will be used if exists (it is a recommended way to set).
MAS entitlements is specified in the [.build.mas](#MasBuildOptions-entitlements).
*/
readonly entitlements?: string | null

/*
The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. `build/osx.inherit.entitlements` will be used if exists (it is a recommended way to set).
Otherwise [default](/~https://github.com/electron-userland/electron-osx-sign/blob/master/default.darwin.inherit.entitlements).
The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. `build/entitlements.osx.inherit.plist` will be used if exists (it is a recommended way to set).
Otherwise [default](/~https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.darwin.inherit.plist).
This option only applies when signing with `entitlements` provided.
*/
Expand All @@ -213,14 +213,14 @@ export interface OsXBuildOptions extends PlatformSpecificBuildOptions {
*/
export interface MasBuildOptions extends OsXBuildOptions {
/*
The path to entitlements file for signing the app. `build/mas.entitlements` will be used if exists (it is a recommended way to set).
Otherwise [default](/~https://github.com/electron-userland/electron-osx-sign/blob/master/default.mas.entitlements).
The path to entitlements file for signing the app. `build/entitlements.mas.plist` will be used if exists (it is a recommended way to set).
Otherwise [default](/~https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.mas.plist).
*/
readonly entitlements?: string | null

/*
The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. `build/mas.inherit.entitlements` will be used if exists (it is a recommended way to set).
Otherwise [default](/~https://github.com/electron-userland/electron-osx-sign/blob/master/default.mas.inherit.entitlements).
The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. `build/entitlements.mas.inherit.plist` will be used if exists (it is a recommended way to set).
Otherwise [default](/~https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.mas.inherit.plist).
*/
readonly entitlementsInherit?: string | null
}
Expand Down
4 changes: 2 additions & 2 deletions src/osxPackager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export default class OsXPackager extends PlatformPackager<OsXBuildOptions> {
signOptions.entitlements = customSignOptions.entitlements
}
else {
const p = `${masOptions == null ? "osx" : "mas"}.entitlements`
const p = `entitlements.${masOptions == null ? "osx" : "mas"}.plist`
if (resourceList.includes(p)) {
signOptions.entitlements = path.join(this.buildResourcesDir, p)
}
Expand All @@ -158,7 +158,7 @@ export default class OsXPackager extends PlatformPackager<OsXBuildOptions> {
signOptions["entitlements-inherit"] = customSignOptions.entitlementsInherit
}
else {
const p = `${masOptions == null ? "osx" : "mas"}.inherit.entitlements`
const p = `entitlements.${masOptions == null ? "osx" : "mas"}.inherit.plist`
if (resourceList.includes(p)) {
signOptions["entitlements-inherit"] = path.join(this.buildResourcesDir, p)
}
Expand Down
8 changes: 4 additions & 4 deletions test/src/osxPackagerTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ test.ifOsx("entitlements in build dir", () => {
platformPackagerFactory: (packager, platform, cleanupTasks) => platformPackager = new CheckingOsXPackager(packager, cleanupTasks),
}), {
tempDirCreated: projectDir => BluebirdPromise.all([
writeFile(path.join(projectDir, "build", "osx.entitlements"), ""),
writeFile(path.join(projectDir, "build", "osx.inherit.entitlements"), ""),
writeFile(path.join(projectDir, "build", "entitlements.osx.plist"), ""),
writeFile(path.join(projectDir, "build", "entitlements.osx.inherit.plist"), ""),
]),
packed: projectDir => {
assertThat(platformPackager.effectiveSignOptions).has.properties({
entitlements: path.join(projectDir, "build", "osx.entitlements"),
"entitlements-inherit": path.join(projectDir, "build", "osx.inherit.entitlements"),
entitlements: path.join(projectDir, "build", "entitlements.osx.plist"),
"entitlements-inherit": path.join(projectDir, "build", "entitlements.osx.inherit.plist"),
})
return BluebirdPromise.resolve(null)
}
Expand Down

0 comments on commit ecdff3c

Please sign in to comment.