Skip to content

Commit

Permalink
feat(appx): Add option to force set build number for AppX
Browse files Browse the repository at this point in the history
Close #3875
  • Loading branch information
develar committed May 9, 2019
1 parent a127a61 commit d6c9d8f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/app-builder-lib/scheme.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@
"showNameOnTiles": {
"description": "Whether to overlay the app's name on top of tile images on the Start screen. Defaults to `false`. (https://docs.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-uap-shownameontiles) in the dependencies.",
"type": "boolean"
},
"setBuildNumber": {
"description": "Whether to set build number. See https://github.com/electron-userland/electron-builder/issues/3875",
"type": "boolean"
}
},
"title": "AppXOptions",
Expand Down
6 changes: 6 additions & 0 deletions packages/app-builder-lib/src/options/AppXOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ export interface AppXOptions extends TargetSpecificOptions {
*/
readonly electronUpdaterAware?: boolean

/**
* Whether to set build number. See https://github.com/electron-userland/electron-builder/issues/3875
* @default false
*/
readonly setBuildNumber?: boolean

/** @private */
readonly makeappxArgs?: Array<string> | null
}
2 changes: 1 addition & 1 deletion packages/app-builder-lib/src/targets/AppxTarget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export default class AppXTarget extends Target {
return name

case "version":
return appInfo.getVersionInWeirdWindowsForm(false)
return appInfo.getVersionInWeirdWindowsForm(options.setBuildNumber === true)

case "applicationId":
const result = options.applicationId || options.identityName || appInfo.name
Expand Down

0 comments on commit d6c9d8f

Please sign in to comment.