Skip to content

Commit

Permalink
adding notarize options to the mas config
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaietta committed Nov 27, 2023
1 parent c842d49 commit 5d1ea39
Show file tree
Hide file tree
Showing 6 changed files with 1,028 additions and 9,981 deletions.
10,936 changes: 970 additions & 9,966 deletions docs/api/electron-builder.md

Large diffs are not rendered by default.

16 changes: 15 additions & 1 deletion docs/configuration/mac.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
The top-level [mac](configuration.md#Configuration-mac) key contains set of options instructing electron-builder on how it should build macOS targets. These options applicable for any macOS target.

<!-- do not edit. start of generated block -->
<h2 id="macconfiguration">MacConfiguration</h2>
<p>undefined</p>
<ul>
<li>
<p><code id="MacConfiguration-category">category</code> String | “undefined” - The application category type, as shown in the Finder via <em>View -&gt; Arrange by Application Category</em> when viewing the Applications directory.</p>
Expand Down Expand Up @@ -106,9 +108,21 @@ The top-level [mac](configuration.md#Configuration-mac) key contains set of opti
</li>
<li>
<p><code id="MacConfiguration-notarize">notarize</code> <a href="#NotarizeLegacyOptions">NotarizeLegacyOptions</a> | <a href="#NotarizeNotaryOptions">NotarizeNotaryOptions</a> | Boolean | “undefined” - Options to use for @electron/notarize (ref: <a href="https://github.com/electron/notarize">https://github.com/electron/notarize</a>). Supports both <code>legacy</code> and <code>notarytool</code> notarization tools. Use <code>false</code> to explicitly disable</p>
<p>Note: In order to activate the notarization step You MUST specify one of the following via environment variables:\n1. <code>APPLE_API_KEY</code>, <code>APPLE_API_KEY_ID</code> and <code>APPLE_API_ISSUER</code>\n2. <code>APPLE_ID</code> and <code>APPLE_APP_SPECIFIC_PASSWORD</code>\n3. <code>APPLE_KEYCHAIN</code> and <code>APPLE_KEYCHAIN_PROFILE</code>\n\nFor security reasons it is recommended to use the first option (see <a href="https://github.com/electron-userland/electron-builder/issues/7859">https://github.com/electron-userland/electron-builder/issues/7859</a>)</p>
<p>Note: In order to activate the notarization step You MUST specify one of the following via environment variables: 1. <code>APPLE_API_KEY</code>, <code>APPLE_API_KEY_ID</code> and <code>APPLE_API_ISSUER</code>. 2. <code>APPLE_ID</code> and <code>APPLE_APP_SPECIFIC_PASSWORD</code> 3. <code>APPLE_KEYCHAIN</code> and <code>APPLE_KEYCHAIN_PROFILE</code></p>
<p>For security reasons it is recommended to use the first option (see <a href="https://github.com/electron-userland/electron-builder/issues/7859">https://github.com/electron-userland/electron-builder/issues/7859</a>)</p>
</li>
</ul>
<h2 id="notarizelegacyoptions">NotarizeLegacyOptions</h2>
<p>undefined</p>
<ul>
<li><code id="NotarizeLegacyOptions-appBundleId">appBundleId</code> String | “undefined” - The app bundle identifier your Electron app is using. E.g. com.github.electron. Useful if notarization ID differs from app ID (unlikely). Only used by <code>legacy</code> notarization tool</li>
<li><code id="NotarizeLegacyOptions-ascProvider">ascProvider</code> String | “undefined” - Your Team Short Name. Only used by <code>legacy</code> notarization tool</li>
</ul>
<h2 id="notarizenotaryoptions">NotarizeNotaryOptions</h2>
<p>undefined</p>
<ul>
<li><strong><code id="NotarizeNotaryOptions-teamId">teamId</code></strong> String - The team ID you want to notarize under for when using <code>notarytool</code></li>
</ul>

<!-- end of generated block -->

Expand Down
19 changes: 19 additions & 0 deletions docs/configuration/publish.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,5 +323,24 @@ Or in the <a href="http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-gu
<p><code id="S3Options-path">path</code> = <code>/</code> String | “undefined” - The directory path.</p>
</li>
</ul>
<h2 id="custompublishoptions">CustomPublishOptions</h2>
<p>undefined</p>
<ul>
<li><strong><code id="CustomPublishOptions-provider">provider</code></strong> “custom” - The provider. Must be <code>custom</code>.</li>
<li><code id="CustomPublishOptions-updateProvider">updateProvider</code> module:builder-util-runtime/out/publishOptions.__type - The Provider to provide UpdateInfo regarding available updates. Required to use custom providers with electron-updater.</li>
</ul>
<p>Inherited from <code>PublishConfiguration</code>:</p>
<ul>
<li>
<p><code id="CustomPublishOptions-publishAutoUpdate">publishAutoUpdate</code> = <code>true</code> Boolean - Whether to publish auto update info files.</p>
<p>Auto update relies only on the first provider in the list (you can specify several publishers). Thus, probably, there`s no need to upload the metadata files for the other configured providers. But by default will be uploaded.</p>
</li>
<li>
<p><code id="CustomPublishOptions-requestHeaders">requestHeaders</code> module:http.OutgoingHttpHeaders - Any custom request headers</p>
</li>
<li>
<p><code id="CustomPublishOptions-timeout">timeout</code> = <code>120000</code> Number | “undefined” - Request timeout in milliseconds. (Default is 2 minutes; O is ignored)</p>
</li>
</ul>

<!-- end of generated block -->
4 changes: 2 additions & 2 deletions packages/app-builder-lib/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export { Configuration, AfterPackContext, MetadataDirectories } from "./configur
export { ElectronBrandingOptions, ElectronDownloadOptions, ElectronPlatformName } from "./electron/ElectronFramework"
export { PlatformSpecificBuildOptions, AsarOptions, FileSet, Protocol, ReleaseInfo } from "./options/PlatformSpecificBuildOptions"
export { FileAssociation } from "./options/FileAssociation"
export { MacConfiguration, DmgOptions, MasConfiguration, MacOsTargetName, DmgContent, DmgWindow } from "./options/macOptions"
export { MacConfiguration, DmgOptions, MasConfiguration, MacOsTargetName, DmgContent, DmgWindow, NotarizeLegacyOptions, NotarizeNotaryOptions } from "./options/macOptions"
export { PkgOptions, PkgBackgroundOptions, BackgroundAlignment, BackgroundScaling } from "./options/pkgOptions"
export { WindowsConfiguration } from "./options/winOptions"
export { AppXOptions } from "./options/AppXOptions"
Expand All @@ -35,7 +35,7 @@ export { MsiWrappedOptions } from "./options/MsiWrappedOptions"
export { CommonWindowsInstallerConfiguration } from "./options/CommonWindowsInstallerConfiguration"
export { NsisOptions, NsisWebOptions, PortableOptions, CommonNsisOptions } from "./targets/nsis/nsisOptions"
export { LinuxConfiguration, DebOptions, CommonLinuxOptions, LinuxTargetSpecificOptions, AppImageOptions, FlatpakOptions } from "./options/linuxOptions"
export { SnapOptions } from "./options/SnapOptions"
export { SnapOptions, PlugDescriptor, SlotDescriptor } from "./options/SnapOptions"
export { Metadata, AuthorMetadata, RepositoryInfo } from "./options/metadata"
export { AppInfo } from "./appInfo"
export { SquirrelWindowsOptions } from "./options/SquirrelWindowsOptions"
Expand Down
7 changes: 6 additions & 1 deletion packages/app-builder-lib/src/options/macOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,12 @@ export interface MacConfiguration extends PlatformSpecificBuildOptions {
* Options to use for @electron/notarize (ref: https://github.com/electron/notarize).
* Supports both `legacy` and `notarytool` notarization tools. Use `false` to explicitly disable
*
* Note: In order to activate the notarization step You MUST specify one of the following via environment variables:\n1. `APPLE_API_KEY`, `APPLE_API_KEY_ID` and `APPLE_API_ISSUER`\n2. `APPLE_ID` and `APPLE_APP_SPECIFIC_PASSWORD`\n3. `APPLE_KEYCHAIN` and `APPLE_KEYCHAIN_PROFILE`\n\nFor security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)
* Note: In order to activate the notarization step You MUST specify one of the following via environment variables:
* 1. `APPLE_API_KEY`, `APPLE_API_KEY_ID` and `APPLE_API_ISSUER`.
* 2. `APPLE_ID` and `APPLE_APP_SPECIFIC_PASSWORD`
* 3. `APPLE_KEYCHAIN` and `APPLE_KEYCHAIN_PROFILE`
*

Check warning on line 217 in packages/app-builder-lib/src/options/macOptions.ts

View workflow job for this annotation

GitHub Actions / test-linux (ArtifactPublisherTest,BuildTest,ExtraBuildTest,RepoSlugTest,binDownloadTest,configura...

Delete `·`

Check warning on line 217 in packages/app-builder-lib/src/options/macOptions.ts

View workflow job for this annotation

GitHub Actions / test-linux (snapTest,debTest,fpmTest,protonTest)

Delete `·`
* For security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)
*/
readonly notarize?: NotarizeLegacyOptions | NotarizeNotaryOptions | boolean | null
}
Expand Down
27 changes: 16 additions & 11 deletions scripts/jsdoc2md2html.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ async function main() {
const partialDir = path.join(__dirname, "jsdoc")
const partials = (await globby(["*.hbs"], {cwd: partialDir})).map(it => path.resolve(partialDir, it))

// const files = [
// path.join(source, "builder/electron-builder.js"),
// path.join(source, "publisher/electron-publish.js"),
// path.join(source, "updater/electron-updater.js"),
// path.join(source, "builder-lib/app-builder-lib.js"),
// path.join(source, "builder-util-runtime/builder-util-runtime.js"),
// path.join(source, "util/builder-util.js"),
// ]
const files = (await globby(["**/*.js"], {cwd: source})).map(it => path.resolve(source, it))
const files = [
path.join(source, "builder/electron-builder.js"),
path.join(source, "publisher/electron-publish.js"),
path.join(source, "updater/electron-updater.js"),
path.join(source, "builder-lib/app-builder-lib.js"),
path.join(source, "builder-util-runtime/builder-util-runtime.js"),
path.join(source, "util/builder-util.js"),
]
// const files = (await globby(["**/*.js"], {cwd: source})).map(it => path.resolve(source, it))
const pages = [
{
page: "api/electron-builder.md", pageUrl: "electron-builder",
Expand Down Expand Up @@ -207,7 +207,11 @@ async function render2(files, jsdoc2MdOptions) {
const pages = [
new Page("configuration/configuration.md", "Configuration"),

new Page("configuration/mac.md", "MacConfiguration"),
new Page("configuration/mac.md", null, {
"MacConfiguration": "",
"NotarizeLegacyOptions" : "",
"NotarizeNotaryOptions" : ""
}),
new Page("configuration/dmg.md", "DmgOptions"),
new Page("configuration/mas.md", "MasConfiguration"),
new Page("configuration/pkg.md", "PkgOptions"),
Expand All @@ -229,7 +233,8 @@ async function render2(files, jsdoc2MdOptions) {
"SpacesOptions": "",
"KeygenOptions": "",
"BitbucketOptions": "",
"S3Options": ""
"S3Options": "",
"CustomPublishOptions": ""
}),

new Page("generated/appimage-options.md", "AppImageOptions"),
Expand Down

0 comments on commit 5d1ea39

Please sign in to comment.