topshell-language / topshell

TopShell - a purely functional, reactive scripting language
MIT License
483 stars 9 forks source link

Homebrew installation #3

Open bensleveritt opened 5 years ago

bensleveritt commented 5 years ago

Not sure if there's an interest for this, but first thought I had was 'is this on brew'?

If there's a general interest, I'm happy to give it a shot.

Ahnfelt commented 5 years ago

It's not currently, but you're very welcome. A package that puts the topshell binary on $PATH?

A central requirement would be create an automated a release process, so that the homebrew package can be released automatically in lockstep with the topshell binaries. How do we go about this?

bensleveritt commented 5 years ago

That's right, putting it on $PATH for Brew installations. Personally, I'd prefer to keep it there, and managed by brew (and avoid losing binaries).

Automating the release process would be nice. Keeping the release up to date on homebrew is usually just a case of creating a PR with the updated formula. I've not seen an automated implementation, but I'm sure it'd be straight forward enough as part of the release script.

I'll whip up a manual one now, to automate later.

bensleveritt commented 5 years ago

Well, somewhat miraculously, I've managed to get the PR together: https://github.com/Homebrew/homebrew-core/pull/43327

Passed the automated tests, just have to see what the Homebrew maintainers think.

Ahnfelt commented 5 years ago

Cool!

One question though - any reason not to use the topshell-macos binary from https://github.com/topshell-language/topshell/releases? It has no dependencies AFAIR.

bensleveritt commented 5 years ago

Using the binaries would put the formula into the Cask section of Homebrew (they don't accept prebuilt binaries in Core), and Casks tend to be GUI applications. Not a big deal, but other, curious minds might want to inspect/remix the installation process before installing, and Homebrew facilitates this easily.

In general, building from source is more open and in tune with the Homebrew community.

Ahnfelt commented 5 years ago

Ah, makes sense. Thank you.

bensleveritt commented 5 years ago

@Ahnfelt I've had a bit of feedback that the Homebrew formula shouldn't depend on Node 8. Is there a hard reason for dependency on an old copy of Node?

bensleveritt commented 5 years ago

A brief investigation suggests that the target for pkg is where the node version matters most, and just omitting node{x} from the target will build with whatever version is current (which in Homebrew's case will be the latest Node for the build process).

Ahnfelt commented 5 years ago

There's no reason other than 8 being what I've been using so far. My guess is that it would work with the latest version.

bensleveritt commented 5 years ago

Just tested with the Node@12 and all good AFAICT. 👍

Ahnfelt commented 5 years ago

Master is now on Node 12.