nuttyartist / notes

Fast and beautiful note-taking app written in C++. Write down your thoughts.
https://www.get-notes.com
Mozilla Public License 2.0
3.6k stars 316 forks source link

Linux: Update and build Snap package #630

Closed guihkx closed 10 months ago

guihkx commented 11 months ago

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:

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

nuttyartist commented 11 months ago

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

nuttyartist commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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:

https://github.com/nuttyartist/notes/assets/626206/7aa240c4-ac95-4dd7-b5dc-341e7818ce66

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:

https://github.com/nuttyartist/notes/assets/626206/b0cad14d-4072-488f-a210-c1105fa6a7ae

Note moving:

https://github.com/nuttyartist/notes/assets/626206/25c9249d-4f6b-471e-bc18-fb20c9a4f2c8

nuttyartist commented 10 months ago

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!