[x]
):snap install gitea
error: snap "gitea" not found
This might be relevant (comment from @tbraeutigam in #2539) :
To get it onto build.snapcraft.io, you just have to go to the site, create an account and log in, and it guides you on how to allow the site to set a trigger for building.
It will then automatically build on new commits and push it to the 'edge' track.
You can then promote specific snaps to the other channels (stable, candidate & beta) either via https://dashboard.snapcraft.io/ (same username & pw) or via command line snapcraft command as seen here: https://docs.snapcraft.io/core/store
A quick look at https://build.snapcraft.io suggests that a GitHub account is all you need to log in (obviously someone with the authority to "officially release" Gitea, or maybe some kind of group account is possible?)
I'm trying to do that.
@lunny I already did :)
But gitea still cannot be searched in store?
Don't know why. It shows as built & published but not when searching, might be some delay. Also version is v1.1.0+commit sha. To get normal version numbers we would need to switch develop -> master -> release/ workflow and tag versions on master
I can't search either, but I am able to see: https://build.snapcraft.io/user/go-gitea/gitea
Per snap docs: Anybody can publish a snap, but doing a Snap Store search will only find snaps that are published to the stable release channel
@lafriks you should create a stable release channel.
But than we need to push current master branch build to stable that does not seems to be right :)
@lafriks I haven't been familiar with Snap, don't know about that. Of course, we should not set master as stable.
There's two options in that case:
The easier option is definitely the former, and seeing how it's available (thanks! and great to see!) via edge for curious people, I think this should be fine?
Speaking as a curious person, sudo snap install gitea --edge
worked for me :) thanks for pointing out that it's available. If I find any issues I'll try to log them before the next release (when this issue is resolved and Gitea appears in the store for everyone).
I was super excited to hear about gtiea being a snap! Thanks for making it. I also was curious and installed on my home server. It works great!
You might be interested to learn that we (snapcrafters ) have been putting some code in the yaml to detect whether it's time to build a stable release or just build to edge. We simply look for the most recent stable tagged release, compare it with what's in the beta channel, and decide at that point whether to git checkout the stable release or build edge. That way you can have one yaml, and build for both stable and unstable builds. If it builds a stable release, you can push that to the beta channel and ask your community to test it. if you're happy with the build, push that release to stable. Subsequent builds will be tip of master and pushed to edge, until another upstream stable release rolls around.
There's a few examples of this in the snapcrafters repo. The obs-studio one is probably simplest. The key parts to note are the override-build:
which does the version detection, and version-script:
which sets the version number in the snap.
Hope that's useful. Ping if you need info / help etc.
<3
we currently do new release/1.x
branch from master and tag on that branch, so on master we do have no tags. So I seem not to find way to have built beta/stable releases from these branches to be published automatically.
Perhaps we could have a drone plugin that'll do snapcraft releases? This would of course require creating a snap drone plugin first.
@techknowlogick seems a good idea.
Heya! Any progress on this? I'd love to be able to install a stable version of gitea from the snap store soon. Anything I can do to help?
@popey no progress yet, but snap has a docker image: https://hub.docker.com/r/snapcore/snapcraft/ that we could probably leverage instead of building a drone-plugin
I think @lafriks had created an account to publish gitea to snap store. When we release a stable version, we can publish it I think.
@lunny not really... snapcraft builds only master branch so we can't really release stable there, only edge... If we want to build from other branches also, we need to build them manually or setup drone to do that somehow and publish to snapcraft store
@popey if you have any ideas on how we could automatically build other branches & tags on them and publish to snap store, ideas are more than welcome
Sure! For some other snaps (one I linked to above) we do some simple detection shell script magic in the snapcraft.yaml. Essentially we use snap info <snapname>
to find out what version is currently published in the store. If the latest stable release (gained from the github api, wget or whatever) is higher, we use git checkout
commands to get the right tagged version and build that. If the latest release is already in the beta channel then we just build the latest master branch. This allows one yaml to build both stable and unstable builds.
See the override-build
section in https://github.com/snapcrafters/obs-studio/blob/master/snap/snapcraft.yaml#L38 and the version-script
section above that for an example.
Something like that could work for you?
@popey but you are not building edge version from master than, right? Also we do not tag on master branch but on release/v1.x
branches, will that work?
I think the original issue (gitea not appearing in the snap store or when using snap find
) is fixed as of now - with the current version of snapd, snap find gitea
results in this:
Name Version Publisher Notes Summary
gitea v1.5.0-rc1+git166.b9ae16d gitea - Gitea - A painless self-hosted Git service
You still have to install it using snap install --edge
, but at least it's visible now.
Also shows up on the snapcraft website. 馃帀
how to submit a stable version?
Well, it's "kinda" fixed. :) The store UI has changed so it exposes snaps which exist in channels other than stable. As gitea is only in edge, it now appears.
So what's exposed on the store is the contents of the 'edge' channel, that is the latest build, which may (or may not) be completely unstable and unsuitable for end users.
I'd recommend making a stable build of your latest release and pushing that to the stable channel. That way people can install gitea and stay on the stable release.
Sorry @lafriks I missed your question. You certainly could build from any tag, as you can use a scriptlet (as I indicated) to do whatever git magic you want to grab the right source revision / tag and build it.
I can not seem to find a way to trigger building other than master branch from their build system. As much as I understand we would have to build our own snap package and upload to their store to get that. But for that we need drone support for that
Most helpful comment
Speaking as a curious person,
sudo snap install gitea --edge
worked for me :) thanks for pointing out that it's available. If I find any issues I'll try to log them before the next release (when this issue is resolved and Gitea appears in the store for everyone).