Some resources that I found helpful when working on https://github.com/Blacksmoke16/oq.
Snap
Can reference the Crystal blog post, and an example snapcraft
file I use for oq
.
- https://crystal-lang.org/2019/06/19/snapcraft-summit-montreal.html#packaging-your-crystal-app-as-a-snap
- https://github.com/Blacksmoke16/oq/blob/master/snap/snapcraft.yaml
Linux
I setup a GH action that will build/upload a static binary into the release assets when a release is created. AFAIK this binary should run on any AMD64 architecture UNIX based OS. Probably wont need the --link-flags
option, as thats for libxml2
.
HomeBrew
Homebrew is the most painful of the three. Currently I’m handling this by just manually building/uploading the bottle. I suppose I could setup some job within GH actions to automate this, but :shrug:. Ideally, the package would be in homebrew core, which handles bottling for you.
The first link was super helpful is figuring out how to setup the bottle. The second is my cheatsheet so I remember what to do in order to update the bottled version.
- https://jonathanchang.org/blog/maintain-your-own-homebrew-repository-with-binary-bottles/
- https://github.com/Blacksmoke16/homebrew-tap#bottling
EDIT:
@oprypin, Is that assuming there aren’t any dependencies? Like wouldn’t libyaml
need to be installed?