mirror of
https://github.com/axllent/mailpit.git
synced 2026-04-26 08:45:54 +03:00
[GH-ISSUE #33] Install with brew? #29
Labels
No labels
awaiting feedback
bug
docker
documentation
enhancement
github_actions
invalid
pull-request
question
stale
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mailpit#29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @laserhybiz on GitHub (Jan 31, 2023).
Original GitHub issue: https://github.com/axllent/mailpit/issues/33
@axllent commented on GitHub (Feb 1, 2023):
I'm sorry but I don't use Mac or brew (or ruby for that matter) so I have no experience here. From what I read though, anyone can become a maintainer of a Brew package which means maintaining the correct recipes and submitting merge requests every time there is a new Mailpit release (it isn't automated I think). I definitely won't be doing that, however please feel free to become a Brew package maintainer for this if you want to.
@mansoorkhan96 commented on GitHub (Feb 1, 2023):
@axllent Thanks for creating Mailpit.
A quick question:
How would i start or stop Mailpit as a service? Similar to homebrew and mailhog
whats the ulternative of following
@axllent commented on GitHub (Feb 1, 2023):
@mansoorkhan96 I honestly do not know anything about Brew, other than that it is a package manager used (mostly) on Mac.
Does the Brew installer for MailHog run it as a service too? I assumed it would just install the application (which then gets run manually from the command line). I may be horribly wrong though. If it does run MailHog as a service too, then I think it would be the same for Mailpit. The two applications (though very different code-wise) run very much the same, listen on the same ports etc . I guess you could just take the MailHog brew scripts and just accordingly for Mailpit.
Sorry, I feel completely useless here as I have literally zero experience or knowledge of Brew and ruby, nor any inclination to learn them for an installer package I don't use :) I'm sure there are plenty of people out there/here who do, and who can help though.
@jimafisk commented on GitHub (Feb 1, 2023):
@axllent I use Goreleaser to automate release builds and support different package managers for a project of mine and it's awesome.
For homebrew, you can manage your own tap relatively easily.
.goreleaser.yml(example: https://github.com/plentico/plenti/blob/master/.goreleaser.yml#L47).github/workflows/release.ymlpass an access token so your project repo can write to your homebrew-tap repo (example: https://github.com/plentico/plenti/blob/master/.github/workflows/release.yml#L58)@muarachmann commented on GitHub (Feb 1, 2023):
+1
@axllent commented on GitHub (Feb 2, 2023):
@jimafisk That's for the information, I had no idea one can simply manage ones own repo/tap! Although I have no intention of switching to Goreleaser (for various reasons), I am looking at other ways to try make this happen. Ideally it would run automatically as part of the Github Actions workflow, however any action I've found appears to require either archives named differently (hardcoded), or the build process to change significantly, neither of which I think is a good compromise.
I have however done some reading on these brew formulas, and if it is that simple as they appear, then I'm sure I can just generate the formula manually and update my homebrew repo. Given I still have zero experience with brew, could you please confirm that the formula would be as simple as something like this (obviously with the correct naming/data), more specifically
bin.install "mailpit"being sufficient to extract the executable from the tarball and copy to the bin path?@jimafisk commented on GitHub (Feb 3, 2023):
I'm definitely not a brew expert (haven't used a mac in over a decade), but yes I'm pretty sure that simple ruby file is all you need to get a tap working. You'll need to specify the url for the release but after that the
bin.install "mailpit"should work!@axllent commented on GitHub (Feb 3, 2023):
Could I get some feedback please? I have created a brew tap which includes Mailpit:
I have only tested using Docker/Linux (amd64) so looking for feedback specifically from Mac arm64 & amd64. Thanks!
@binotaliu commented on GitHub (Feb 5, 2023):
@axllent I just tried that on my Intel Mac (Ventura 13.2) and can confirm that it works properly.
However I would suggest to rename the repository to
axllent/homebrew-mailpit. By default,brew tap {username}/{repo}would lookup to{username}/homebrew-{repo}on GitHub. So no need to manually specify git url if you follow the naming convention. 1https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap#installing ↩︎
@axllent commented on GitHub (Feb 5, 2023):
Thank you for testing and the information @binotaliu , I appreciate it. I'm actually planning of using the same repo for some other packages too (rather than having a separate repo per application just for brews), so if the only downside is the initial
brew tap...command to add the repo, then I'll keep it as-is. I don't use brew, so this is just for those that find it easier.@axllent commented on GitHub (Feb 6, 2023):
Actually I realise I missed the logic/point in branch naming, so I changed the repo to
axllent/homebrew-apps, meaning it gets added asbrew tap axllent/apps(in which mailpit is found). This remains generic to include other apps, and allows for the shorthand addition to taps. I've updated my previous instructions in this thread to not confuse anyone. Thanks again for the help everyone.@laserhybiz commented on GitHub (Feb 6, 2023):
🎉