Skip to content

Commit 5031116

Browse files
committed
fix(mas): Warning when using entitlements.mas.plist
Closes #729
1 parent a1b2b0e commit 5031116

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

src/macPackager.ts

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -134,41 +134,32 @@ export default class MacPackager extends PlatformPackager<MacOptions> {
134134
}, (<any>this.devMetadata.build)["osx-sign"], baseSignOptions)
135135

136136
const resourceList = await this.resourceList
137+
if (resourceList.includes(`entitlements.osx.plist`)) {
138+
throw new Error("entitlements.osx.plist is deprecated name, please use entitlements.mac.plist")
139+
}
140+
if (resourceList.includes(`entitlements.osx.inherit.plist`)) {
141+
throw new Error("entitlements.osx.inherit.plist is deprecated name, please use entitlements.mac.inherit.plist")
142+
}
137143

138144
const customSignOptions = masOptions || this.platformSpecificBuildOptions
139145
if (customSignOptions.entitlements != null) {
140146
signOptions.entitlements = customSignOptions.entitlements
141147
}
142148
else {
143-
let p = `entitlements.${masOptions == null ? "osx" : "mas"}.plist`
149+
const p = `entitlements.${masOptions == null ? "mac" : "mas"}.plist`
144150
if (resourceList.includes(p)) {
145-
warn("entitlements.osx.plist is deprecated name, please use entitlements.mac.plist")
146151
signOptions.entitlements = path.join(this.buildResourcesDir, p)
147152
}
148-
149-
if (masOptions == null) {
150-
p = `entitlements.mac.plist`
151-
if (resourceList.includes(p)) {
152-
signOptions.entitlements = path.join(this.buildResourcesDir, p)
153-
}
154-
}
155153
}
156154

157155
if (customSignOptions.entitlementsInherit != null) {
158156
signOptions["entitlements-inherit"] = customSignOptions.entitlementsInherit
159157
}
160158
else {
161-
let p = `entitlements.${masOptions == null ? "osx" : "mas"}.inherit.plist`
159+
const p = `entitlements.${masOptions == null ? "mac" : "mas"}.inherit.plist`
162160
if (resourceList.includes(p)) {
163-
warn("entitlements.osx.inherit.plist is deprecated name, please use entitlements.mac.inherit.plist")
164161
signOptions["entitlements-inherit"] = path.join(this.buildResourcesDir, p)
165162
}
166-
if (masOptions == null) {
167-
p = `entitlements.mac.inherit.plist`
168-
if (resourceList.includes(p)) {
169-
signOptions["entitlements-inherit"] = path.join(this.buildResourcesDir, p)
170-
}
171-
}
172163
}
173164

174165
await task(`Signing app (identity: ${name})`, this.doSign(signOptions))

0 commit comments

Comments
 (0)