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 compression option #6201

Merged
merged 8 commits into from
Jan 12, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
changes for #6201 (#1)
* use new app-builder-bin & hook up compression option

* set default snap compression type to lzo
  • Loading branch information
ppd authored and om26er committed Jan 12, 2022
commit 2fe80b42f681baab1a9b6e7a859c3f11474c1a84
4 changes: 2 additions & 2 deletions packages/app-builder-lib/scheme.json
Original file line number Diff line number Diff line change
Expand Up @@ -5414,8 +5414,8 @@
"type": "null"
}
],
"default": "xz",
"description": "Sets the compression type for the snap. Can be xz or lzo. Defaults to xz when not specified."
"default": "lzo",
"description": "Sets the compression type for the snap. Can be xz or lzo. Defaults to lzo when not specified."
},
"useTemplateApp": {
"description": "Whether to use template snap. Defaults to `true` if `stagePackages` not specified.",
Expand Down
4 changes: 4 additions & 0 deletions packages/app-builder-lib/src/targets/snap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ export default class SnapTarget extends Target {
if (this.isUseTemplateApp) {
args.push("--template-url", `electron4:${snapArch}`)
}

if (options.compression != null) {
args.push("--compression", options.compression)
}
await executeAppBuilder(args)

await packager.info.callArtifactBuildCompleted({
Expand Down
2 changes: 1 addition & 1 deletion packages/builder-util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"7zip-bin": "~5.1.1",
"@types/debug": "^4.1.6",
"@types/fs-extra": "^9.0.11",
"app-builder-bin": "3.7.1",
"app-builder-bin": "4.1.0",
"bluebird-lst": "^1.0.9",
"builder-util-runtime": "workspace:*",
"chalk": "^4.1.1",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.