Closed nodesocket closed 3 years ago
A brew package is a good idea. I was originally going to call this git-view
but there's already a git-view
on Homebrew, so I called it git-peek
instead.
The most reliable way probably is to embed the node binary in a single file along with the code. That way, it doesn't have a dependency on node, and it would ideally also load from a v8 compiler cache's version, which would speed up start time somewhat. I think this is what Heroku / Vercel / others do.
The trickier question is updates – it would probably work best as a Github Action that re-runs on commit.
I wonder if there's a tool that does this automatically – turns a node.js shebang file into a single node binary
Almost have pkg
integrated, just trying to figure out how to use release-it
.
It will now automatically bundle as a separate binary for macOS x64 every release: https://github.com/Jarred-Sumner/git-peek/releases/tag/1.1.20
Now the question is: how to make a homebrew formula that automatically updates it
Added! This was way easier than I thought
@Jarred-Sumner thanks for doing this. I am curious what was required to get your package published to brew
? Where is that brew code? Also, did generating a single binary with pkg
work then?
Is it possible to get a brew package published? I've never tried to cook a formula on brew before. Not sure it's even possible with Node.js and
git-peek
being installed globally.