Skip to content

chore(snap): migrate snap generation from app-builder-bin to JS #8892

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

Draft
wants to merge 39 commits into
base: master
Choose a base branch
from

Conversation

mmaietta
Copy link
Collaborator

No description provided.

Copy link

changeset-bot bot commented Feb 23, 2025

🦋 Changeset detected

Latest commit: aef891c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
app-builder-lib Patch
builder-util Patch
electron-publish Patch
dmg-builder Patch
electron-builder-squirrel-windows Patch
electron-builder Patch
electron-forge-maker-appimage Patch
electron-forge-maker-nsis-web Patch
electron-forge-maker-nsis Patch
electron-forge-maker-snap Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the linux label Feb 23, 2025
@mmaietta
Copy link
Collaborator Author

Verified on ubuntu 22.04 arm64 VM
Screenshot 2025-02-25 at 8 48 53 AM

Verified on Fedora 40 arm64 VM
Screenshot 2025-02-25 at 8 53 01 AM

@mmaietta mmaietta requested a review from beyondkmp February 25, 2025 17:46
@mmaietta mmaietta marked this pull request as ready for review February 25, 2025 17:46
@mmaietta
Copy link
Collaborator Author

Confirming isTemplateApp = false also works on Fedora and Ubuntu arm64 VMs
Screenshot 2025-02-27 at 11 16 18 AM
Screenshot 2025-02-27 at 11 16 24 AM

@mmaietta mmaietta requested a review from beyondkmp February 28, 2025 01:05
# Conflicts:
#	test/src/linux/snapHeavyTest.ts
@beyondkmp
Copy link
Collaborator

LGTM

@beyondkmp
Copy link
Collaborator

The snap compiled with this version fails to install, with the following error:

➜  dist git:(master) ✗ sudo snap install --dangerous electron-quick-start-typescript_1.0.0_amd64.snap
error: cannot read snap file: open /tmp/read-file3906864710/unpack/meta/snap.yaml: no such file or
       directory

Using the same configuration with 26.0.10 works without any issues.

➜  dist git:(master) ✗ sudo snap install --dangerous electron-quick-start-typescript_1.0.0_amd64.snap
Ensure prerequisites for "electron-quick-start-typescript" are available                                                           -
electron-quick-start-typescript 1.0.0 installed
@beyondkmp
Copy link
Collaborator

electron-builder.yaml

files:
  - out/
linux:
  target:
    - snap
  category: Utility

let out: string
try {
out = await exec("snapcraft", ["--version"])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After installing snapcraft, if /snap/bin is not in the PATH, it will keep reporting errors. Then, when you try to install it again, it says it's already installed.

image

Can this error message be more specific, or suggest using /snap/bin/snapcraft? This would be more user-friendly for first-time snap users. I am a first-time user myself, so if there were more specific prompts, I would know to add /snap/bin to the PATH. This is something that could be improved upon later to enhance the experience.

@mmaietta mmaietta marked this pull request as draft March 6, 2025 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment