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

Feature Request: Add homebrew support? #14

Closed
bobbymannino opened this issue Nov 30, 2024 · 17 comments
Closed

Feature Request: Add homebrew support? #14

bobbymannino opened this issue Nov 30, 2024 · 17 comments
Assignees
Labels
enhancement New feature or request macos Only relates to MacOS

Comments

@bobbymannino
Copy link
Contributor

Is there any future plans of this being added to homebrew for quick installation?

@gorillamoe gorillamoe self-assigned this Nov 30, 2024
@gorillamoe gorillamoe changed the title add homebrew support Feature Request: Add homebrew support? Nov 30, 2024
@gorillamoe gorillamoe added enhancement New feature or request macos Only relates to MacOS labels Nov 30, 2024
@gorillamoe
Copy link
Member

gorillamoe commented Nov 30, 2024

I don't see anything blocking this, besides that I read somewhere that homebrew apps should not be GUI binaries afaik: https://stackoverflow.com/questions/26644427/homebrew-only-installs-packages-without-gui

But download of the .DMG, when CI can sign and notarize properly, should be easy enough.

@bobbymannino
Copy link
Contributor Author

bobbymannino commented Nov 30, 2024

that was quite a while ago, homebrew-cask is now built into the core of brew, so it should be possible, i personally install nearly everything with brew, jetbrains, zed, raycast, arc, etc. is it worth me looking into on your behalf or would you like to?

@gorillamoe
Copy link
Member

gorillamoe commented Nov 30, 2024

I would like you to help me with that. Would it be part of this repository then, or is a separate repo a requirement?

If a second one is a requirement, I would really like (not a requirement) to have it under the MW org (I can give you full access to the repo unser the org)

If it simply would be part of this repo, you can simply open a PR then I guess.

@bobbymannino
Copy link
Contributor Author

i have never done it myself but theres no time like the present to learn, the docs for it are below, as far as i remember you can do it in the same repo and you add a cask file to their (homebrews) repo to make it publicly available. i will do some reading up see if i can come up with something

https://docs.brew.sh/Adding-Software-to-Homebrew#casks

@bobbymannino
Copy link
Contributor Author

bobbymannino commented Nov 30, 2024

what is the minimum major mac version supported (eg. sierra, sequoia)?

Edit: i believe it to be catalina and have set it as such

@gorillamoe
Copy link
Member

gorillamoe commented Nov 30, 2024

The official Readme on GitHub says macOS (Big Sur and up).

@bobbymannino
Copy link
Contributor Author

Homebrew/homebrew-cask#193757

I tried to make a pr on the homebrew repo adding it, but they have stated that the app is not signed?

is also seems @MattiaTraverso (who i do not know) tried to add bananas to homebrew a few days ago but failed for the same reason

this is the message they gave about signing

macOS on ARM requires software to be signed. Please contact the upstream developer to let them know they should sign and notarize their software.

@gorillamoe
Copy link
Member

gorillamoe commented Nov 30, 2024

This is true and I already paid Apple 🍎 for a developer license 🙈

I also set up the CI so that it signs and notarizes the app on build and release.

But notarizing sometimes can take up to 3 days. I pay per minute on the runners, which is fair, but I won't wait for 3 days to have the app notarized.

So my plan is to get #13 done today and then the pipeline does not need to wait for Apple to finish the process.

Then, once Apple has notarized the app, a second pipeline will be triggered, which simply downloads the current released version and staples it.

Idk if this will work, but I'll try.

Yesterday I had one CI running for 35 minutes and still not finished. Another one just 17 minutes before I canceled it.

For reference: electron/notarize#179

@bobbymannino
Copy link
Contributor Author

looking online it shouldn't be taking that long, only when something (apples side or not) is wrong. i see the average online being between 10-20 minutes really. and the issue you sent is saying that the command passes a wait flag in which doesnt do anything positive.

there is a way to start a gh action using a webhook

on:
  repository_dispatch:
    types: [my_custom_event]
curl -X POST \
  https://api.github.com/repos/<user>/<repo>/dispatches \
  -H "Authorization: token <your_token>" \
  -d '{"event_type": "my_custom_event"}'

so if you can call that after notorisation has finished? that would save the runners. it would be something like; Push vx.x.x -> gh_actions.build -> notorize -> gh_actions.release. but after calling build the runner sleeps so its not waiting (saving £££)

@gorillamoe
Copy link
Member

gorillamoe commented Nov 30, 2024

That's exactly how I was planning to do it somehow, but not sure if it will work. I theory yes, but that would be to good to be true and I would wonder why it hasn't been done before by the official electron team.

@gorillamoe
Copy link
Member

I tried another time with the unpatched package and it's again running for 18+ minutes now: https://github.com/mistweaverco/bananas/actions/runs/12092128510/job/33733012387

@bobbymannino
Copy link
Contributor Author

taking a look at the log, it doesn't look like its getting to the release script which is where the notorizing would happen right? it looks like electron-builder --mac --publish never that part is the part thats causing it to hang, i havent released anything on apple but can you see a notorizing history on your account? to check if they have been in the apple queue?

@gorillamoe
Copy link
Member

gorillamoe commented Nov 30, 2024

It hangs in the afterSign script. If I remove that it finishes without problems.

@bobbymannino
Copy link
Contributor Author

downloading the app straight from gh, apple used to block it and then you had to go into Settings > Privacy > Allow App, but now it doesn't.

i will retry with homebrew and see what happens

@gorillamoe
Copy link
Member

Yes, I added the sign and notarize workflow for the latest 0.0.12 release, should work now ❤️

@gorillamoe gorillamoe moved this to Todo in Bananas Dec 1, 2024
@gorillamoe gorillamoe moved this from Todo to In Progress in Bananas Dec 1, 2024
@bobbymannino
Copy link
Contributor Author

Homebrew/homebrew-cask#193817

I've submitted the pr, just waiting for a review on it then it should be live 🤞

@bobbymannino
Copy link
Contributor Author

It is live in brew now, you can install it using brew install --cask bananas 🎉

@github-project-automation github-project-automation bot moved this from In Progress to Done in Bananas Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request macos Only relates to MacOS
Projects
Archived in project
Development

No branches or pull requests

2 participants