Closed bitspittle closed 2 years ago
Hi!
The best way to make the binary available to a large audience would be via JReleaser, which already provides the necessary functionality to publish to SDKMAN!, Scoop, Brew, Chocolatey and many other package managers!
https://jreleaser.org/guide/latest/configuration/packagers/index.html
If you need any help, feel free to reach out!
Honestly I was hoping at some point to run into someone who had ideas how to do this. Thanks!
I'll take a look at your link in the next few days and will definitely reach out if I have any questions.
On Sat, Jan 15, 2022, 8:19 AM Oliver Weiler @.***> wrote:
If you need any help, feel free to reach out!
— Reply to this email directly, view it on GitHub https://github.com/varabyte/kobweb/issues/82#issuecomment-1013710284, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNONAUBZAJ62M3GIQDL4FTUWGNAVANCNFSM5KHDAWYA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID: @.***>
So I'm thinking the package managers I need to support are snap, homebrew, and chocolatey. In other to cover Linux, Mac, add Windows. Does that sound right to you? Or am I missing some?
On Sat, Jan 15, 2022, 8:23 AM David Herman @.***> wrote:
Honestly I was hoping at some point to run into someone who had ideas how to do this. Thanks!
I'll take a look at your link in the next few days and will definitely reach out if I have any questions.
On Sat, Jan 15, 2022, 8:19 AM Oliver Weiler @.***> wrote:
If you need any help, feel free to reach out!
— Reply to this email directly, view it on GitHub https://github.com/varabyte/kobweb/issues/82#issuecomment-1013710284, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNONAUBZAJ62M3GIQDL4FTUWGNAVANCNFSM5KHDAWYA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID: @.***>
I'd also add SDKMAN! (which works on Mac, Linux, Cygwin, git-bash, ...) and possibly Scoop, which seems to be popular on Windows.
But you can start with just one packager (as a Mac user I'd start with Homebrew) and then add more packagers over time.
Once the initial setup works, adding more packagers is mostly a two-line config change.
Thanks for the advice! I'll also put sdkman and scoop on my radar.
Yeah I'll go incremental, starting with homebrew, but once I get the first one working I'll probably try to get them all done in short order so I don't have to think about it anymore.
I'm caught up in a bit of markdown junk at the moment which I want to fix so I can get out a 0.9.1 (and unblock a blog post I'm working on). After that this is my next priority, because I think easing downloads would be so welcome for new users.
On Tue, Jan 18, 2022, 8:30 AM Oliver Weiler @.***> wrote:
I'd also add SDKMAN! (which works on Mac, Linux, Cygwin, git-bash, ...) and possibly Scoop, which seems to be popular on Windows.
But you can start with just one packager (as a Mac user I'd start with Homebrew) and then add more packagers over time.
Once the initial setup works, adding more packagers is mostly a two-line config change.
— Reply to this email directly, view it on GitHub https://github.com/varabyte/kobweb/issues/82#issuecomment-1015584956, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNONATPZ2MSIJLZHVG6ODLUWWIS3ANCNFSM5KHDAWYA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were assigned.Message ID: @.***>
Hi! As an arch linux user, I'd love to have kobweb in the AUR (Arch User Repository), and I'd love to contribute a package for the same (akin to a brew formula). But if the plan is to go the JReleaser way, I am willing to add and maintain an unofficial binary package (a lot of packages in the AUR are unofficial). Please let me know if that's fine!
Hey Aakarshit, this is great timing.
First of all, wow -- thanks!
I was just about to start this issue probably Monday or Tuesday. I was planning to use jreleaser because it seems like it will be easy to set up, but package management is still pretty new to me and I'm still not sure about all the options. I'm guessing jreleaser doesn't prevent me from supporting other approaches later (e.g. getting on apt), so I expect it is safe to try it.
I'm out right now but when I get back, I'll send you a direct message. I really appreciate your offer to maintain an unofficial binary package for Arch and would be so happy for support from others!
By the way, in my README, I provide instructions for pulling down a .zip file but I very recently started uploading a .tar file beside it because it seems like that is more friendly for Linux. Just wanted to mention that in case that helps
Ok I gotta run for now but I'll ping you again when I get home.
David
On Sun, Jan 23, 2022, 9:32 AM Aakarshit Uppal @.***> wrote:
Hi! As an arch linux user, I'd love to have kobweb in the AUR (Arch User Repository) https://wiki.archlinux.org/title/Arch_User_Repository, and I'd love to contribute a package for the same (akin to a brew cask). But if the plan is to go the JReleaser way, I am willing to add and maintain an unofficial binary package (a lot of packages in the AUR are unofficial). Please let me know if that's fine!
— Reply to this email directly, view it on GitHub https://github.com/varabyte/kobweb/issues/82#issuecomment-1019531062, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNONAQN4W6DLKLMBZIRVMTUXQ3SFANCNFSM5KHDAWYA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were assigned.Message ID: @.***>
Hi @aksh1618! The maintainer of JReleaser is very responsive and always open for ideas, so it may be a good idea to propose to add AUR packaging support.
Hi @helpermethod! Yes, I was considering that, but I wasn't sure because they already have snap support and AppImage & Flatpak support seems to be under consideration, but I guess doesn't hurt to discuss! Created issue for the same.
@bitspittle you are correct. JReleaser can help you getting started with the package managers it supports. Should there be additional targets that are not managed by JReleaser you can still adapt your release process to make that happen, of course the additional packagers would have to be handled outside of JReleaser.
FWIW GoFish is yet another packager that you can use on mac, linux, and windows, which happens to be supported by JReleaser.
Be aware that publication to some packagers is quite straight forward whereas others require signing up for an account, request access keys/tokens, or send a PR following specific guidelines. JReleaser supports:
You don't have to use all of them at once, just letting you know what's possible at the moment. JReleaser let's you configure just what you need.
@aalmiray I may be running into https://github.com/jreleaser/jreleaser/issues/142 (which is marked closed)
I have a multi-module project here, as documented in the project's ARCHITECTURE.md
The kobweb binary project is under /cli/kobweb/, so what's happening is I'm failing the config step because the basedir is wrong.
(Note, I anonymized my paths, below -- the output from your plugin does not have ...
in it)
> Task :cli:kobweb:jreleaserConfig FAILED
[INFO] JReleaser 1.0.0-M1
[INFO] - basedir set to /.../kobweb/cli/kobweb
Execution failed for task ':cli:kobweb:jreleaserConfig'.
> Could not determine git HEAD
* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':cli:kobweb:jreleaserConfig'.
Caused by: org.jreleaser.util.JReleaserException: Could not determine git HEAD
at org.jreleaser.engine.context.ModelConfigurer.configure(ModelConfigurer.java:45)
at org.jreleaser.engine.context.ContextCreator.create(ContextCreator.java:75)
at org.jreleaser.gradle.plugin.tasks.AbstractJReleaserTask.createContext(AbstractJReleaserTask.groovy:103)
at org.jreleaser.gradle.plugin.tasks.JReleaserConfigTask.displayConfig(JReleaserConfigTask.groovy:66)
Caused by: org.eclipse.jgit.errors.RepositoryNotFoundException: repository not found: .../kobweb/cli/kobweb
at org.eclipse.jgit.lib.BaseRepositoryBuilder.build(BaseRepositoryBuilder.java:627)
at org.eclipse.jgit.api.Git.open(Git.java:93)
at org.eclipse.jgit.api.Git.open(Git.java:73)
at org.jreleaser.sdk.git.GitSdk.open(GitSdk.java:66)
at org.jreleaser.sdk.git.GitSdk.head(GitSdk.java:164)
at org.jreleaser.engine.context.ModelConfigurer.configure(ModelConfigurer.java:42)
... 121 more
It's not clear what the right path forward for me is. I guess I wish I could pass a path value to jreleaser
, or maybe it could query Gradle for what the root path is, or maybe it could navigate up my path looking for a .git
folder. Or maybe instead I'm just supposed to declare my jreleaser config in the root project build.gradle
? Hmmm, but I don't really want to do that, though.
I'll keep digging and update this thread if I figure it out.
Of course one minute after I write my comment I find gitRootSearch
in the docs :stuck_out_tongue_winking_eye:
Unblocked again.
I have to say, JReleaser is a really cool project. I'll definitely tweet about it when this is all hooked up.
I'm going to take a break for tonight and jump back in it tomorrow.
Here's what I have so far. I'm using Gradle to configure things. If any jreleaser folks skim it and can call out anything I'm obviously missing, let me know!
The next steps for me are to:
@aksh1618 FYI right now my releases look like this: https://github.com/varabyte/kobweb/releases/tag/v0.9.1 but I think starting with v0.9.2 I'll be naming them "Kobweb CLI v0.9.2" for the binary and "Kobweb v0.9.2" for the rest. I decided that when working on my jreleaser configs, which you can see on line 53
Oh, @helpermethod and/or @aalmiray I did have one question about releasing projects. Is it normal for people to push SNAPSHOT builds? It seems like the defaults enabled them but I turned them off. I assumed that I would only push out kobweb
upgrades after ever release.
You can push snapshots as early-access releases using the same configuration (JReleaser does this for its own releases) but you won't be able to push packages using package managers (well except for JBang and Docker) as it makes more sense to use non snapshot releases for those.
OK, I think Homebrew support is working. I've put out a few feelers to my friends to see if anyone can try installing it to make sure, but it's late so no responses yet.
I've quietly updated the README (new section here) and will announce Homebrew support on Twitter (and calling attention to JReleaser) after getting confirmation from at least one or two others that it seems to be working fine for them.
brew install varabyte/tap/kobweb
in case anyone in this issue discussion would like to try for themselves.
As an aside, this would have taken me so much longer without JReleaser! @aalmiray it's clear you spent a ton of time on the project. It's one of those things that now that I've used it, I don't know how it hasn't existed before. The output of jreleaserConfig
is :ok_hand: Eventually I plan to move my changelog / release generation logic to using it.
@aalmiray @helpermethod I've added links to your github names in the README section I linked above as thanks. If you'd prefer I didn't do that for any reason let me know and I can remove them.
@aksh1618 I ended up splitting the releases now instead of waiting to post 1.0 like I originally said I was planning to. The kobweb binary-specific release is now: https://github.com/varabyte/kobweb/releases/tag/cli-v0.9.2 and moving forward should keep that format. This means that the download link is https://github.com/varabyte/kobweb/releases/download/cli-v0.9.2/kobweb-0.9.2.tar
Check out the build config for various values.
I'll keep this bug open until I have support for all the packages suggested earlier.
@bitspittle The Homebrew installation works perfectly!
Tried to get snap
working today. I learned a lot, but it's harder than I thought to get strict mode working (kobweb
calls into gradle
and git
for various operations, which may or may not be the reason kobweb
installed via snap
is barfing). I'm going to back off for now.
Next going to look at scoop
(since @aalmiray mentioned it's easy), then sdkman
(looks like @helpermethod is super involved in that project, nice!), and finally chocolatey
, for Windows. I'm not sure yet I'll aim to add support for spec
, since at that point it might be diminishing returns?
I've updated the first comment in this issue chain into a checklist to represent these decisions.
Hey @helpermethod -- I was reading up on SDKMAN! today and had two questions...
1) My understanding from the docs is that this is a package manager for larger projects where people might want to intentionally maintain multiple versions side by side and change the active version at a moment's notice. Do small binaries like kobweb
fit into the model? (Where basically, if you can upgrade, you always should!)
2) I assume I should be looking at SDKMAN! as a vendor? If so, according to: https://sdkman.io/vendors#access, I should be contacting the team. Could you be my contact? Or am I looking at the wrong instructions? Should I be starting at a different page?
Thanks for any guidance!
Hey @helpermethod -- I was reading up on SDKMAN! today and had two questions...
1) My understanding from the docs is that this is a package manager for larger projects where people might want to intentionally maintain multiple versions side by side and change the active version at a moment's notice. Do small binaries like
kobweb
fit into the model? (Where basically, if you can upgrade, you always should!)2) I assume I should be looking at SDKMAN! as a vendor? If so, according to: https://sdkman.io/vendors#access, I should be contacting the team. Could you be my contact? Or am I looking at the wrong instructions? Should I be starting at a different page?
Thanks for any guidance!
I've seen you've already opened a PR to add the kobweb candidate, good start! For the Vendor API credentials it's best to contact @marc0der via the SDKMAN! Slack channel.
Yes! I'm in touch with him by email (assuming there's not more than one Marco on the SDKMAN team). At this point I'm hoping that it won't be too many more days before I get SDKMAN! support in.
Thanks for your help getting me kickstarted on this. I'll join the slack if I run into any issues.
On Sun, 30 Jan 2022 at 22:36, Oliver Weiler @.***> wrote:
Hey @helpermethod https://github.com/helpermethod -- I was reading up on SDKMAN! today and had two questions...
1.
My understanding from the docs is that this is a package manager for larger projects where people might want to intentionally maintain multiple versions side by side and change the active version at a moment's notice. Do small binaries like kobweb fit into the model? (Where basically, if you can upgrade, you always should!) 2.
I assume I should be looking at SDKMAN! as a vendor? If so, according to: https://sdkman.io/vendors#access, I should be contacting the team. Could you be my contact? Or am I looking at the wrong instructions? Should I be starting at a different page?
Thanks for any guidance!
I've seen you've already opened a PR to add the kobweb candidate, good start! For the Vendor API credentials it's best to contact @marc0der https://github.com/marc0der via the SDKMAN! Slack channel https://slack.sdkman.io.
— Reply to this email directly, view it on GitHub https://github.com/varabyte/kobweb/issues/82#issuecomment-1025425038, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNONARREGUPHEI5NRGA6G3UYYUVHANCNFSM5KHDAWYA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
How to get onto package managers in Linux or Homebrew in Mac? What's the equivalent for Windows?Support and/or intentionally reject the following package managers:
[x] homebrew
[x] scoop
[X]
chocolatey(1)[X]
gofish(2)[X]
macports(2)[X]
snapcraft(3)[X]
spec(4)[X]
docker(5)[x] sdkman
strikethroughmeans not now, we can close this bug without them, but I'd always be open to supporting them latersnappy-debug
isn't really giving me useful information.