Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(snap): add Snap title option #5350

Merged
merged 1 commit into from
Nov 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/app-builder-lib/scheme.json
Original file line number Diff line number Diff line change
Expand Up @@ -4647,6 +4647,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 @@ -104,6 +104,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 @@ -85,6 +85,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