Skip to content

Commit

Permalink
feat(snap): add Snap title option (#5350)
Browse files Browse the repository at this point in the history
  • Loading branch information
sidneys authored Nov 28, 2020
1 parent 0fb69b5 commit 2801de7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/app-builder-lib/scheme.json
Original file line number Diff line number Diff line change
Expand Up @@ -4670,6 +4670,13 @@
"string"
]
},
"title": {
"description": "An optional title for the snap, may contain uppercase letters and spaces. Defaults to `productName`. See [snap format documentation](https://snapcraft.io/docs/snap-format).",
"type": [
"null",
"string"
]
},
"useTemplateApp": {
"description": "Whether to use template snap. Defaults to `true` if `stagePackages` not specified.",
"type": "boolean"
Expand Down
5 changes: 5 additions & 0 deletions packages/app-builder-lib/src/options/SnapOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ export interface SnapOptions extends CommonLinuxOptions, TargetSpecificOptions {
* The defaults can be found in [snap.ts](https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/templates/snap/snapcraft.yaml#L29).
*/
readonly appPartStage?: Array<string> | null

/**
* An optional title for the snap, may contain uppercase letters and spaces. Defaults to `productName`. See [snap format documentation](https://snapcraft.io/docs/snap-format).
*/
readonly title?: string | null
}

export interface PlugDescriptor {
Expand Down
1 change: 1 addition & 0 deletions packages/app-builder-lib/src/targets/snap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export default class SnapTarget extends Target {
deepAssign(snap, {
name: snapName,
version: appInfo.version,
title: options.title || appInfo.productName,
summary: options.summary || appInfo.productName,
description: this.helper.getDescription(options),
architectures: [toLinuxArchString(arch, "snap")],
Expand Down

0 comments on commit 2801de7

Please sign in to comment.