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

Linux: Update and build Snap package #630

Merged
merged 2 commits into from
Aug 23, 2023
Merged

Conversation

guihkx
Copy link
Collaborator

@guihkx guihkx commented Aug 2, 2023

This PR updates & builds the snap package for Linux distributions.

How it will work:

Once this PR is merged, you (@nuttyartist) should login to snapcraft.io and connect your GitHub account and this repository there. Once that is done, every time we push something into the master branch, their build system will automatically build a snap package for the following CPU architectures:

  • amd64
  • arm64
  • armhf
  • ppc64el

I also added a new build job to our own Linux CI, which will provide a single snap package, for amd64 CPUs. That's done to help ensure our snap package won't break that easily on changes coming from a pull request, for example. This also has the obvious benefit of making things easier for snap users to test changes coming from said pull requests.

How you can test the snap package right now:

  1. Wait for the CI to build the snap package
  2. Download it
  3. Set up snapd
  4. Install the snap package with: snap install ./notes_*.snap --dangerous
  5. Run Notes with: snap run notes

Closes #185
Closes #501
Closes #579

There are some caveats, but overall I consider the snap package usable.
Everytime we push to the main branch (master), Snapcraft automatically
triggers a new build using _their_ build system, which is better than
GitHub Actions because it supports many CPU architectures.

However, we still have to make sure the snap package continues to
work, and that's why this commit adds a new CI job for the snap package
(amd64 only).
@nuttyartist
Copy link
Owner

Wow, great job @guihkx! That is so needed. I'll test this tomorrow.

@nuttyartist
Copy link
Owner

It's been a while, I know, I was busy working on the new subscription model (soon to be PR) and the Block Editor. But I tested this now, and it works incredibly well! I verified and all the notes from the previous version are migrated succesfully into the new version. Awesome work.

So, each push into master will trigger a build and update the snap in the ubuntu repo? I'll need to be careful about pushing things straight into master than hah.

So I guess we can merge this now but only connect the Ubuntu repo when V2.2.1 is ready (I aim for this Thursday).

@nuttyartist
Copy link
Owner

Okay one issue detected, seems like drag and drop doesn't work for some reason. Dragging and dropping notes into folders or regular notes into pinned notes.

Can you please check on your end as well?

@guihkx
Copy link
Collaborator Author

guihkx commented Aug 23, 2023

So, each push into master will trigger a build and update the snap in the ubuntu repo?

Yes, but those builds will be sent to the edge channel, a place dedicated for testing dev builds. Besides, to install builds from this channel you must pass a specific command line flag to snap install.

But once you deem a build "stable", you can to manually promote it to the stable channel:

snaps-promoting.mp4

In the video above I just promoted the amd64 build, but it obviously makes more sense to promote all other builds at the same time as well.

So I guess we can merge this now but only connect the Ubuntu repo when V2.2.1 is ready (I aim for this Thursday).

Sounds good to me!

Okay one issue detected, seems like drag and drop doesn't work for some reason.

Seems to work just fine here.

Note pinning:

pinning.mp4

Note moving:

moving.mp4

@nuttyartist
Copy link
Owner

nuttyartist commented Aug 23, 2023

Yes, but those builds will be sent to the edge channel, a place dedicated for testing dev builds. Besides, to install builds from this channel you must pass a specific command line flag to snap install.

But once you deem a build "stable", you can to manually promote it to the stable channel:

Perfect! Sounds like a good process.

Seems to work just fine here.

Oh, ok. I wonder why it didn't let me drop, I was using a VM with Ubuntu 23.

In any case, I'll merge this now. Thanks!

@nuttyartist nuttyartist merged commit f4ac893 into nuttyartist:master Aug 23, 2023
17 checks passed
@guihkx guihkx deleted the snap branch August 23, 2023 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add snap creation to automatic builds Flatpak and Snap packages Update snap to 1.0.0
2 participants