carsonip / Penguin-Subtitle-Player

An open-source, cross-platform standalone subtitle player
GNU General Public License v3.0
304 stars 38 forks source link

Created a snap #73

Closed kristbaum closed 4 years ago

kristbaum commented 4 years ago

I build a snap of Penguin-Subtitle-Player and published it on the snap store using this snapcraft.yaml file. The entry can be found here. I thought this would be an easier way to install, than e.g the WebUpd8 ppa. Hope this is okay for you. If you don't want it there I will, of course, remove it.

Otherwise I could create a pull request with the files needed for the snap, and we could set up an automated build system.

Greetings

carsonip commented 4 years ago

Hi @kristbaum, thanks for the support! Yes, I suppose this may be easier than the WebUpd8 ppa for some people. But I'm not familiar with snap and here's some questions.

  1. What's the steps to update the snap entry when there's a new release? How would the automated build system look like? It would be great to have an automated build system to update the entry on snapcraft.
  2. Why is there a kde-neon line in the yaml file?

Thanks!

carsonip commented 4 years ago

When the build system is ready, remember to update the project's readme to include the snap under Download section.

kristbaum commented 4 years ago
1. What's the steps to update the snap entry when there's a new release? How would the automated build system look like? It would be great to have an automated build system to update the entry on snapcraft.

The build system hooks into GitHub and supposedly rebuilds the snap when commits are made to the linked repo. The snap is then built on launchpad.net and released in the store. All that needs to be done afterwards is to promote the newly build snap to stable, which maybe can be done automatically too.

2. Why is there a kde-neon line in the yaml file?

This is to allow the snap access to QT libraries. The name is indeed a bit odd, but it's the only qt framework snap available.

I've forked the repo to test the build system, and it seems to work so far. I'm gonna create a pull request to add the required files to the original repo, and then I can transfer the ownership of the "penguin-subtitle-player" snap-name to your snapcraft.io account. (You would need to tell me your account name)

If you don't want create a snapcraft.io acc, then you could set up a github organization with access to the original repo and invite me into it, because the person in control of the store page needs to be an owner of the linked repo for automatic builds.

Alternativly I could fork the repo whenever there is a new release, to update the snap.

I think the first solution is probably the best. There is also an option to collaborate on a administering a snap, which may work too. (have not tried this one yet). For that to work, you would need to dm me your email address, so I can add you as an administrator for the snap name :)

carsonip commented 4 years ago

Hi @kristbaum,

Sorry for the late reply. I have created a snapcraft.io account and find my email in git commit history here: https://github.com/carsonip/Penguin-Subtitle-Player/commit/b80e65bf82fd8a3218022d200005b31e8f01c612.patch

I'm wondering how do I mix this with my git tag and release workflow? If the CI listens on master, will it create master builds with the same version repeatedly? Then I suppose I have to create a release branch and the CI builds on it, am I right?

kristbaum commented 4 years ago

Yeah, that would be a solution. Or you can just not promote the non-stable builds of the snap (the ones, which are created after each commit), and wait until there is a new stable version to promote that. I think this would be easier, as you wouldn't not need to change your development flow.

The only thing to remember is to promote the snap build after a release to stable, and maybe change the version number in the snapcraft.yaml file. I've added you as a collaborator to the snap, I hope you have all the access you need.

carsonip commented 4 years ago

Sorry for the late reply again.

So if I don't promote non-stable builds, will the CI's build version replace the stable snap version? Or do I have to bump the version beforehand such that it doesn't replace the current version?

Also I'll merge the PR once the CI part is ready. Will you work on that part too? Otherwise I'll work on it.

Many thanks!

carsonip commented 4 years ago

Merged #74