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: add support for snap packages #531

Merged
merged 3 commits into from
Jan 17, 2024
Merged

feat: add support for snap packages #531

merged 3 commits into from
Jan 17, 2024

Conversation

gapplef
Copy link
Contributor

@gapplef gapplef commented Jan 17, 2024

The snapcraft.yaml is quite straightforward. I'll explain a little bit, in case you may want to change it in the future.

On the top is various meta information, only things to be care are grade and confinement:

  • grade can be devel or stable, defines the quality grade of the snap.
  • confinement can be strict or classic, the latter means the snap have full system access just like traditionally applications.

The packing process is defined in parts section.

  • Building is take care by rust plugin, and carry out with craftctl default. You may replace it with any custom build commands.
  • craftctl set version=... is used to set the version info.
  • The rest is all for dependencies.
    current only fd-find, ripgrep, zoxide, fzf are boundle with yazi, these may need to be change with requirements.

As for the release workflow, I did not add new matrix, current build is take place on x86_64-unknown-linux-gnu with snapcore/action-build@v1. The release file would be yazi*.snap.
The snap package can be install with sudo snap install <package.snap> --dangerous --classic

Finally, to make it easier for users to get future updates, the snap can be publish to snap store. Snapcraft also provide its own build service to automatic build and release snaps.

@sxyazi
Copy link
Owner

sxyazi commented Jan 17, 2024

Thank you for your work and detailed description, let me make some minor changes and then merge it!

@sxyazi sxyazi changed the title Add support for snap packages feat: add support for snap packages Jan 17, 2024
@sxyazi sxyazi merged commit 4647ec0 into sxyazi:main Jan 17, 2024
3 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants