Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a Homebrew Cask #1368

Open
1 task done
SalvatoreT opened this issue Feb 24, 2025 · 21 comments
Open
1 task done

Create a Homebrew Cask #1368

SalvatoreT opened this issue Feb 24, 2025 · 21 comments
Assignees
Labels
enhancement New feature or request

Comments

@SalvatoreT
Copy link
Contributor

Please explain the motivation behind the feature request.
Allow developers to install/update Goose using a brew install --cask ... command.

Describe the solution you'd like
Add a Homebrew Cask (https://github.com/Homebrew/homebrew-cask).

Describe alternatives you've considered
We could not do this.

Additional context
I'll get this going right now.

  • I have verified this does not duplicate an existing feature request
@SalvatoreT SalvatoreT added the enhancement New feature or request label Feb 24, 2025
SalvatoreT added a commit to SalvatoreT/homebrew-cask that referenced this issue Feb 24, 2025
@SalvatoreT
Copy link
Contributor Author

Here's the PR to add the Cask. Homebrew/homebrew-cask#202763

@wendytang
Copy link
Collaborator

wendytang commented Feb 24, 2025

@SalvatoreT thanks for the submission! how to maintain this with version updates?

@SalvatoreT
Copy link
Contributor Author

There's a bot that checks repositories for the latest version and bumps the version + checksum automatically. Here's an example: Homebrew/homebrew-cask#202766

SalvatoreT added a commit to SalvatoreT/homebrew-cask that referenced this issue Feb 25, 2025
@wendytang
Copy link
Collaborator

I was able to install goose via brew 👍

@wendytang
Copy link
Collaborator

did you want to add the cli as well? otherwise, i'm happy to add it as a ticket

@SalvatoreT
Copy link
Contributor Author

Sure! Do you want the cli as a Homebrew Cask (pre-built/signed by y'all) or via a regular Homebrew package (i.e. built via Homebrew's GitHub actions)?

@wendytang
Copy link
Collaborator

I think we could just use the prebuilt binaries in our release process, so let's do homebrew cask (thanks @damienrj for the input)

@SalvatoreT
Copy link
Contributor Author

Hey @wendytang, my mac really doesn't want to run the goose Rust binary.

I tried running it via a Cask and by just downloading the binary from the Release page, and my laptop was not into it.

Image

@SalvatoreT
Copy link
Contributor Author

Can y'all sign the Rust binaries in the same way you sign the Desktop app?

@SalvatoreT
Copy link
Contributor Author

I have the Cask pretty much ready to go, but I don't want to submit it unless I can run it without the security warning.
Homebrew/homebrew-cask@master...SalvatoreT:homebrew-cask:salvatoret/block-goose-cli

@wendytang
Copy link
Collaborator

let me get the apple_team_id tomorrow. does the binary need to be notarized by apple to run without security warnings?

@baxen
Copy link
Collaborator

baxen commented Feb 27, 2025

Hi @SalvatoreT it's been ages! I'm surprised that cask requires the signature i didn't realize that, curling it directly like our download script does bypasses this check so we haven't signed the CLIs yet.

Looks like for Cask (and definitely true for directly downloading from a browser) we'll have to start signing. @michaelneale when he's back I think has more info on setting this up

@SalvatoreT
Copy link
Contributor Author

Hey @baxen! It's been a little over five years! My how time flies. We're old now.

Just ping me whenever you want, I'll update my branch, and we can get the CLI cask shipped.

@michaelneale
Copy link
Collaborator

hi @SalvatoreT - I didn't realise that cask required signing, I haven't seen that elsewhere (but maybe didn't notice).

I am not familiar with signing binaries - the .app is done by "electron forge" which uses a fairly heavyweight app specific process to sign and notarize (latter being the heaviest) - there are secrets available to the release pipelines:

Image

so I wonder if can run some commands referring to those?

@SalvatoreT
Copy link
Contributor Author

I didn't realise that cask required signing, I haven't seen that elsewhere (but maybe didn't notice).

@michaelneale, if you just download the CLI binary from GitHub and try running it, you'll hit the same issue as Cask.

@SalvatoreT
Copy link
Contributor Author

SalvatoreT commented Mar 3, 2025

I should also clarify that I think signing the app would solve the problem, but I'm not 100% sure.

I will also clarify that I don't have any experience signing Electron apps. I just know that there can be problems Rust binaries.

@michaelneale
Copy link
Collaborator

@SalvatoreT yeah - that is chrome/browser adding quarantine bits - if you curl, it bypasses it (similar to what brew does I think, or used to) so I don't think it is needed.

@michaelneale
Copy link
Collaborator

(ie not quite the same as installing via curl/brew)

@michaelneale
Copy link
Collaborator

michaelneale commented Mar 4, 2025

@SalvatoreT yeah I don't think signing is needed for these - but shouldn't cli be a formula not a cask? a cask won't add it to your path I think (making the cli not work as expected?)

@SalvatoreT
Copy link
Contributor Author

SalvatoreT commented Mar 4, 2025

A CLI can be a formula or a cask! I have the CLI working as a cask on this branch.

homebrew-cask on  salvatoret/block-goose-cli via 💎
❯ HOMEBREW_NO_INSTALL_FROM_API=1 brew install --cask block-goose-cli
==> Downloading https://github.com/block/goose/releases/download/v1.0.10/goose-aarch64-apple-darwin.tar.bz2
Already downloaded: /Users/sal/Library/Caches/Homebrew/downloads/e8fe8544a649c86a1652566fc4b8d8481abd6482b52cd45bd9bce1cffad24475--goose-aarch64-apple-darwin.tar.bz2
==> Installing Cask block-goose-cli
==> Linking Binary 'goose' to '/opt/homebrew/bin/goose'
🍺  block-goose-cli was successfully installed!

homebrew-cask on  salvatoret/block-goose-cli via 💎
❯ which goose
/opt/homebrew/bin/goose

@SalvatoreT
Copy link
Contributor Author

I'm happy to do either one, but it sounds like y'all wanted the cask.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants