MetaMask / metamask-mobile

Mobile web browser providing access to websites that use the Ethereum blockchain
https://metamask.io
Other
2.17k stars 1.12k forks source link

Consolidating Homebrew Commands #1167

Open Zidail opened 5 years ago

Zidail commented 5 years ago

Hey there!

I was going through some of the configuration files for CircleCI and noticed that we might be able to slim down our setup for contributors and CI by using a Brewfile. It functions much like a Gemfile, but with out the .lock portion.

Let's take this for example: https://github.com/MetaMask/metamask-mobile/blob/f1d8e10db0dea3c779e0e89da22964930000c254/.circleci/config.yml#L83

...
- run:
          name: Load dependencies
          command:
            |
              brew update
              brew install watchman
              brew tap wix/brew
              brew install --HEAD applesimutils
...

We'd be able to condense most of the brew install to just:

# Brewfile
brew install watchman
brew tap wix/brew
brew install --HEAD applesimutils
...
- run:
          name: Load dependencies
          command:
            |
              brew update
              brew bundle
...

The brew bundle command can then be used anywhere in the project that might require all those to be installed such as new contributors or CI. The file can also serve as documentation for what's required in this project. Usage of this file is already part of Homebrew so we won't need to add anything extra to the project apart from this file itself.

Thoughbot's post on Brewfile.

So what do all of you think?

brunobar79 commented 5 years ago

This sounds good like a good idea. Easy to test and not critical!