Skip to content

Commit ecdff3c

Browse files
committed
fix: entitlements file names according to new electron-osx-sign conventions
BREAKING CHANGES: See new entitlements paths in the wiki
1 parent b85ddfe commit ecdff3c

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

docs/Options.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ See all [appdmg options](https://www.npmjs.com/package/appdmg#json-specification
7575
| 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>
7676
| 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).
7777
| 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>
78-
| 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>
79-
| 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>
78+
| 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>
79+
| 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>
8080

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

8686
| Name | Description
8787
| --- | ---
88-
| 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>
89-
| 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>
88+
| 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>
89+
| 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>
9090

9191
<a name="WinBuildOptions"></a>
9292
### `.build.win`

src/metadata.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,14 @@ export interface OsXBuildOptions extends PlatformSpecificBuildOptions {
192192
readonly identity?: string | null
193193

194194
/*
195-
The path to entitlements file for signing the app. `build/osx.entitlements` will be used if exists (it is a recommended way to set).
195+
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).
196196
MAS entitlements is specified in the [.build.mas](#MasBuildOptions-entitlements).
197197
*/
198198
readonly entitlements?: string | null
199199

200200
/*
201-
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).
202-
Otherwise [default](https://github.com/electron-userland/electron-osx-sign/blob/master/default.darwin.inherit.entitlements).
201+
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).
202+
Otherwise [default](https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.darwin.inherit.plist).
203203
204204
This option only applies when signing with `entitlements` provided.
205205
*/
@@ -213,14 +213,14 @@ export interface OsXBuildOptions extends PlatformSpecificBuildOptions {
213213
*/
214214
export interface MasBuildOptions extends OsXBuildOptions {
215215
/*
216-
The path to entitlements file for signing the app. `build/mas.entitlements` will be used if exists (it is a recommended way to set).
217-
Otherwise [default](https://github.com/electron-userland/electron-osx-sign/blob/master/default.mas.entitlements).
216+
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).
217+
Otherwise [default](https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.mas.plist).
218218
*/
219219
readonly entitlements?: string | null
220220

221221
/*
222-
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).
223-
Otherwise [default](https://github.com/electron-userland/electron-osx-sign/blob/master/default.mas.inherit.entitlements).
222+
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).
223+
Otherwise [default](https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.mas.inherit.plist).
224224
*/
225225
readonly entitlementsInherit?: string | null
226226
}

src/osxPackager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export default class OsXPackager extends PlatformPackager<OsXBuildOptions> {
148148
signOptions.entitlements = customSignOptions.entitlements
149149
}
150150
else {
151-
const p = `${masOptions == null ? "osx" : "mas"}.entitlements`
151+
const p = `entitlements.${masOptions == null ? "osx" : "mas"}.plist`
152152
if (resourceList.includes(p)) {
153153
signOptions.entitlements = path.join(this.buildResourcesDir, p)
154154
}
@@ -158,7 +158,7 @@ export default class OsXPackager extends PlatformPackager<OsXBuildOptions> {
158158
signOptions["entitlements-inherit"] = customSignOptions.entitlementsInherit
159159
}
160160
else {
161-
const p = `${masOptions == null ? "osx" : "mas"}.inherit.entitlements`
161+
const p = `entitlements.${masOptions == null ? "osx" : "mas"}.inherit.plist`
162162
if (resourceList.includes(p)) {
163163
signOptions["entitlements-inherit"] = path.join(this.buildResourcesDir, p)
164164
}

test/src/osxPackagerTest.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,13 @@ test.ifOsx("entitlements in build dir", () => {
107107
platformPackagerFactory: (packager, platform, cleanupTasks) => platformPackager = new CheckingOsXPackager(packager, cleanupTasks),
108108
}), {
109109
tempDirCreated: projectDir => BluebirdPromise.all([
110-
writeFile(path.join(projectDir, "build", "osx.entitlements"), ""),
111-
writeFile(path.join(projectDir, "build", "osx.inherit.entitlements"), ""),
110+
writeFile(path.join(projectDir, "build", "entitlements.osx.plist"), ""),
111+
writeFile(path.join(projectDir, "build", "entitlements.osx.inherit.plist"), ""),
112112
]),
113113
packed: projectDir => {
114114
assertThat(platformPackager.effectiveSignOptions).has.properties({
115-
entitlements: path.join(projectDir, "build", "osx.entitlements"),
116-
"entitlements-inherit": path.join(projectDir, "build", "osx.inherit.entitlements"),
115+
entitlements: path.join(projectDir, "build", "entitlements.osx.plist"),
116+
"entitlements-inherit": path.join(projectDir, "build", "entitlements.osx.inherit.plist"),
117117
})
118118
return BluebirdPromise.resolve(null)
119119
}

0 commit comments

Comments
 (0)