Skip to content

Commit

Permalink
fix(snap): electron-builder uses mksquashfs options that are incompat…
Browse files Browse the repository at this point in the history
…ible with snap store

Close #2803
  • Loading branch information
develar committed Apr 18, 2018
1 parent 2a707cc commit e828245
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion docker/9/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM electronuserland/builder:base

ENV NODE_VERSION 9.8.0
ENV NODE_VERSION 9.11.1

# this package is used for snapcraft and we should not clear apt list - to avoid apt-get update during snap build
RUN apt-get -qq update && \
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"////": "All typings are added into root `package.json` to avoid duplication errors in the IDE compiler (several `node.d.ts` files).",
"dependencies": {
"7zip-bin": "~3.1.0",
"app-builder-bin": "1.8.4",
"app-builder-bin": "1.8.5",
"archiver": "^2.1.1",
"async-exit-hook": "^2.0.1",
"aws-sdk": "^2.224.1",
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 @@ -11,7 +11,7 @@
"out"
],
"dependencies": {
"app-builder-bin": "1.8.4",
"app-builder-bin": "1.8.5",
"temp-file": "^3.1.1",
"fs-extra-p": "^4.5.2",
"is-ci": "^1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/electron-builder-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"homepage": "https://github.com/electron-userland/electron-builder",
"dependencies": {
"7zip-bin": "~3.1.0",
"app-builder-bin": "1.8.4",
"app-builder-bin": "1.8.5",
"async-exit-hook": "^2.0.1",
"bluebird-lst": "^1.0.5",
"chromium-pickle-js": "^0.2.0",
Expand Down
1 change: 1 addition & 0 deletions packages/electron-builder-lib/src/targets/snap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export default class SnapTarget extends Target {
}

if (!this.isUseTemplateApp && snap.parts.app.after.includes(desktopPart)) {
// todo change install to override-build when new snapcraft release will be installed on most user machines
const desktopPartOverride: any = {
install: `set -x
export XDG_DATA_DIRS=$SNAPCRAFT_PART_INSTALL/usr/share
Expand Down
4 changes: 2 additions & 2 deletions scripts/snap-template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ rm -rf ~/squashfs-root
#unsquashfs /media/psf/test/electron-builder-test/dist/se-electron2_1.1.0_amd64.snap
unsquashfs /media/psf/test/electron-builder-test/dist/se-wo-template_1.1.0_amd64.snap
rm -rf ~/squashfs-root/app ~/squashfs-root/snap ~/squashfs-root/meta ~/squashfs-root/command.sh
#mksquashfs ~/squashfs-root /media/psf/test/electron-template-2.snap -b 1048576 -comp xz -Xdict-size 100% -noappend -comp xz -no-xattrs -no-fragments -all-root
mksquashfs ~/squashfs-root /media/psf/test/electron-template-1.snap -b 1048576 -comp xz -Xdict-size 100% -noappend -comp xz -no-xattrs -no-fragments -all-root
#mksquashfs ~/squashfs-root /media/psf/test/electron-template-2.snap -comp xz -noappend -comp xz -no-xattrs -no-fragments -all-root
mksquashfs ~/squashfs-root /media/psf/test/electron-template-1.snap -comp xz -noappend -comp xz -no-xattrs -no-fragments -all-root

shasum -a 512 /Volumes/test/electron-template-2.snap | xxd -r -p | base64
1 change: 0 additions & 1 deletion test/src/linux/snapTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ test.ifAll.ifDevOrLinuxCi("snap electron 2", app({
},
}))

// custom packages to test not-prepacked snap build
// very slow
test.skip("snap full", app({
targets: snapTarget,
Expand Down
30 changes: 15 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -411,25 +411,25 @@ anymatch@^2.0.0:
micromatch "^3.1.4"
normalize-path "^2.1.1"

[email protected].4:
version "1.8.4"
resolved "https://registry.yarnpkg.com/app-builder-bin-linux/-/app-builder-bin-linux-1.8.4.tgz#9fa4f4f6af21f147cdedc69279940134c77d297f"
[email protected].5:
version "1.8.5"
resolved "https://registry.yarnpkg.com/app-builder-bin-linux/-/app-builder-bin-linux-1.8.5.tgz#bf001d3ef347e1179680a1760fea83d0832fc344"

[email protected].4:
version "1.8.4"
resolved "https://registry.yarnpkg.com/app-builder-bin-mac/-/app-builder-bin-mac-1.8.4.tgz#abd35353167b037a15353fe44c84b0b17045d12f"
[email protected].5:
version "1.8.5"
resolved "https://registry.yarnpkg.com/app-builder-bin-mac/-/app-builder-bin-mac-1.8.5.tgz#31282504d232081a9de94d377736bf904bbfbd53"

[email protected].4:
version "1.8.4"
resolved "https://registry.yarnpkg.com/app-builder-bin-win/-/app-builder-bin-win-1.8.4.tgz#ba5f7a7d8ae48d32c400691b3c45f6f746c27748"
[email protected].5:
version "1.8.5"
resolved "https://registry.yarnpkg.com/app-builder-bin-win/-/app-builder-bin-win-1.8.5.tgz#d7eefc1dff6052e137a3c5d68cd6e68ba862054b"

[email protected].4:
version "1.8.4"
resolved "https://registry.yarnpkg.com/app-builder-bin/-/app-builder-bin-1.8.4.tgz#ca8fd02209c2e0681de97fdb4c559d93381cc812"
[email protected].5:
version "1.8.5"
resolved "https://registry.yarnpkg.com/app-builder-bin/-/app-builder-bin-1.8.5.tgz#ac0c0fad3c348ff3bde367e49b25cf5edc414407"
optionalDependencies:
app-builder-bin-linux "1.8.4"
app-builder-bin-mac "1.8.4"
app-builder-bin-win "1.8.4"
app-builder-bin-linux "1.8.5"
app-builder-bin-mac "1.8.5"
app-builder-bin-win "1.8.5"

append-transform@^0.4.0:
version "0.4.0"
Expand Down

0 comments on commit e828245

Please sign in to comment.