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

Add snapcraft.yaml #1542

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add snapcraft.yaml #1542

wants to merge 1 commit into from

Conversation

nicolasbock
Copy link

Signed-off-by: Nicolas Bock [email protected]

@dandavison
Copy link
Owner

dandavison commented Nov 18, 2023

Hi @nicolasbock, this PR is lacking any explanation. E.g. what it does, how we know it's working correctly, etc. I don't see a snap/snapcraft.yaml file in analogous Rust CLI projects such as bat and ripgrep. It's something to do with Ubuntu, right?

@nicolasbock
Copy link
Author

Hi @dandavison

Sorry, I should have explained this better (or at all 😉).

Snaps originated at Canonical (Ubuntu) but they are not limited to Ubuntu. You can install and run snaps on most major Linux distributions. The idea behind snaps is that they provide a container like environment for the application and ship with all necessary dependencies. This makes them secure and updates are decoupled from the underlying host OS.

I will add a GitHub Action to this PR so you could test the snap.

@nicolasbock
Copy link
Author

I'll add a little to the GitHub Action in the next iteration of this PR.

@nicolasbock
Copy link
Author

Done

@pablospe
Copy link
Contributor

@nicolasbock Perhaps you can update the description of this PR. How is this used?

@dandavison
Copy link
Owner

@nicolasbock sorry to be slow here. Could you

  • add to the PR description of how you tested the GitHub Action
  • describe what needs to be done in order for us to add an "Install with snap" section in the installation section of the manual that can be tested in docker
  • The installed executable should be delta, not git-delta (That's true in all other packager managers and I believe that's how it's going to be when installed via apt: see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=944028#101)

This change adds a snap configuration file so that git-delta can be
built as a snap. In addtion, a GitHub Action workflow is included which
builds the snap and installs it inside the GitHub runner for potential
functional testing.

Signed-off-by: Nicolas Bock <[email protected]>
@nicolasbock
Copy link
Author

@nicolasbock Perhaps you can update the description of this PR. How is this used?

The PR provides a configuration file for a snap package. Snaps are distributed through the snapstore and are essentially containers that contain the application with all its dependencies. You can view a proof of concept listing here: https://snapcraft.io/git-delta-snap

Usage of delta does not change compared to other installation approaches.

@nicolasbock
Copy link
Author

@nicolasbock sorry to be slow here. Could you

  • add to the PR description of how you tested the GitHub Action
  • describe what needs to be done in order for us to add an "Install with snap" section in the installation section of the manual that can be tested in docker
  • The installed executable should be delta, not git-delta (That's true in all other packager managers and I believe that's how it's going to be when installed via apt: see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=944028#101)

Thanks @dandavison

The GitHub action right now builds the snap and installs it in the GitHub runner, configures git to use delta and then runs a very simple command to test whether git can run delta. This is clearly the most basic form of functional testing but it does something ;)

Installation of the snap is described in the proof of concept listing in the snap store, https://snapcraft.io/git-delta-snap. What is missing here is that once / if you approve of this PR you will have to ask the snapstore to grant you the snap name git-delta. I can help you with that. Once you have access to this name you can configure the snapstore listing to automatically build the snap from this repository here, which will keep the snap up to date. Again, I can help here.

I hope this answered your questions.

@dandavison dandavison mentioned this pull request Aug 10, 2024
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.

3 participants