Coder Social home page Coder Social logo

Mac homebrew package about blightmud HOT 9 CLOSED

blightmud avatar blightmud commented on June 22, 2024
Mac homebrew package

from blightmud.

Comments (9)

dnaka91 avatar dnaka91 commented on June 22, 2024 1

Hello @LiquidityC I created a formula for Blightmud and made a PR to the main Homebrew repository. The brew audit command gave a warning because this repo doesn't have enough stars, forks or watchers so we'll see how it goes.

If it's going to be declined then you would have to create your own tap (a custom homebrew repo) that people can add to install Blightmud.

Homebrew/homebrew-core#61803

from blightmud.

LiquidityC avatar LiquidityC commented on June 22, 2024

Hey, thanks man. Awesome. We'll see how it goes. To be honest I have very little knowledge about homebrew and the inner workings. But I really appreciate the help.

from blightmud.

LiquidityC avatar LiquidityC commented on June 22, 2024

I saw that they responded as you suspected with a reference on notability.
I guess setting up a tap is the next step.

A question for you @dnaka91 since you seem more oriented in homebrew then I am. Would it be valuable to create a tap and provide blightmud in that way? Or would it be just as good to supply a premade mac build with the release?

From my linux perspective I always got the feeling that homebrew is what everyone uses. I'd be happy for some input. πŸ˜„

from blightmud.

dnaka91 avatar dnaka91 commented on June 22, 2024

Yes, unfortunately they refused it, but we can set up a new tap. Let me explain you the basic details of homebrew and how taps work. Sorry if it is a little lengthy.

Homebrew in general

So homebrew formulas are just very specialized Ruby scripts with instructions about how to build some piece of software. Everything in the main repository has to adhere to some rules and as it would be asked too much of the maintainers they surely can't take in every single software.

The benefit of being in the main repo is that you get pre-built binaries for free. The homebrew team has a build pipeline that builds the software for several version of MacOS and uploads the binaries to some storage so it can be directly installed on user machines and doesn't have to be compiled every single time.

Personal taps

Creating a personal tap is fairly easy. You run the brew tap-new command to create a new tap repo locally and put your formulas in there. Then you publish it as <username>/homebrew-tap on Github. The generated repo is actually just a README.md and a ο»Ώο»ΏFormula folder so you don't really have to run the command and a new empty repo will do. Just the repo name is important.

Users will be able to install your software by running either brew install LiquidityC/tap/blightmud or brew tap LiquidityC/tap and then brew install blightmud.

If you want to create a personal tap, you have basically two options at hand:

  • Create a normal formula (same as for the main repo) but homebrew will build it from source for everyone. That means it'll install the full Rust toolchain and locally build Blightmud. This is the easiest but install a ton of extra stuff on the user's machine plus it takes longer to install.
  • Publish binaries with every release in the Blightmud repo and create a formula to simply download the pre-compiled binaries from Github. This means more setup and maintenance for you but is the most convenient for users.

In any case, having a personal tap is an additional maintenance step because after every release you have to update the version, url and hash of the formula.

Benefits to have a tap

  • Compared to the main repo you don't have to follow any rules for the formulas itself.
  • Users can install your software with a single command, don't have to care where to put it and get updates automatically through homebrew.

My recommendation

I would say let's start simple and create a personal tap and then add the exact same formula as I tried for the main repo by PR. Users will have to install it from source for now, but it works.

Then we need to update your current Github Actions pipeline to create the MacOS binaries and include them in new releases. After that's done we update the formulas to use the binaries instead. There is actually a linuxbrew from the same makers so we can adapt that in the formula and users of linuxbrew will be able to install the binaries as well.

from blightmud.

LiquidityC avatar LiquidityC commented on June 22, 2024

Good advice. Well since I don't own a mac I'll let you move your PR to this new repo.

https://github.com/LiquidityC/homebrew-blightmud

Just change everything as needed. And thanks again for all the help. I guess I'll add a macbook to my wishlist for future testing πŸ˜„

from blightmud.

LiquidityC avatar LiquidityC commented on June 22, 2024

I'll get to work on a mac-build with the release package.

from blightmud.

LiquidityC avatar LiquidityC commented on June 22, 2024

Hi @dnaka91, I just bumped the version on the tap since we have a new release. There is also a binary mac release included in this release. Feel like helping me out one more time to update the tap?

from blightmud.

dnaka91 avatar dnaka91 commented on June 22, 2024

Sure, no problem πŸ‘

from blightmud.

dnaka91 avatar dnaka91 commented on June 22, 2024

Here is the PR Blightmud/homebrew-blightmud#2.

As I mentioned, if you would like to support Linuxbrew as well (which is just homebrew working on Linux), then you would need to add the linux binary as *.tar.gz or *.zip file to the release as well.

from blightmud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.