Homebrew / homebrew-bundle

📦 Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask and the Mac App Store.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Qs on merging Brewfiles.

ZuBB opened this issue · comments

I am writing a tiny helper app to maintain a set of Brewfiles. One of the operations I need to do is merging 2+ Brewfiles into one. I have a couple of Qs related to that:

  • is there any API for that?
  • if not, is it OK to merge "manually"?
  • does the order of item types in Brewfile matter? (ie, taps are the 1st group)
  • how "conditional" items (brew "gnupg" if OS.mac?) are created/appeared in Brewfile?
  • is there any API for that?

No.

  • if not, is it OK to merge "manually"?

Should be ok but we don't really recommend it.

  • does the order of item types in Brewfile matter? (ie, taps are the 1st group)

It doesn't matter too much but it may result in e.g. a formula automatically installing a tap before you explicitly install the tap later.

The order is the same that brew bundle will use for installation, if that's the question.

  • how "conditional" items (brew "gnupg" if OS.mac?) are created/appeared in Brewfile?

They are added/edited manually and not outputted by brew bundle dump.

@MikeMcQuaid, thank you for the answer