topshell icon indicating copy to clipboard operation
topshell copied to clipboard

Homebrew installation

Open bensleveritt opened this issue 6 years ago • 11 comments

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.

bensleveritt avatar Aug 07 '19 16:08 bensleveritt

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?

Ahnfelt avatar Aug 07 '19 20:08 Ahnfelt

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 avatar Aug 08 '19 21:08 bensleveritt

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.

bensleveritt avatar Aug 21 '19 01:08 bensleveritt

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.

Ahnfelt avatar Aug 21 '19 08:08 Ahnfelt

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.

bensleveritt avatar Aug 22 '19 09:08 bensleveritt

Ah, makes sense. Thank you.

Ahnfelt avatar Aug 22 '19 13:08 Ahnfelt

@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 avatar Sep 16 '19 12:09 bensleveritt

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).

bensleveritt avatar Sep 16 '19 16:09 bensleveritt

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.

Ahnfelt avatar Sep 16 '19 16:09 Ahnfelt

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

bensleveritt avatar Sep 16 '19 19:09 bensleveritt

Master is now on Node 12.

Ahnfelt avatar Sep 16 '19 20:09 Ahnfelt