Skip to content

Commit

Permalink
Add brewfile to bootstrap (github-linguist#6068)
Browse files Browse the repository at this point in the history
Add Brewfile for bootstrapping deps on Mac

Co-authored-by: Colin Seymour <[email protected]>
  • Loading branch information
bval and lildude authored Sep 16, 2022
1 parent f3f2103 commit 12cfef6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ test/fixtures/ace_modes.json
*.so
linguist-grammars*
.venv
Brewfile.lock.json
4 changes: 4 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
brew "cmake"
brew "pkg-config"
brew "icu4c"
cask "docker"
6 changes: 1 addition & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ Linguist uses the [`charlock_holmes`](https://github.com/brianmario/charlock_hol
[Docker](https://www.docker.com/) is also required when adding or updating grammars.
These components have their own dependencies - `icu4c`, and `cmake` and `pkg-config` respectively - which you may need to install before you can install Linguist.

For example, on macOS with [Homebrew](http://brew.sh/):
```bash
brew install cmake pkg-config icu4c
brew install --cask docker
```
On macOS with [Homebrew](http://brew.sh/) the instructions below under Getting started will install these dependencies for you.

On Ubuntu:
```bash
Expand Down
7 changes: 7 additions & 0 deletions script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ set -e

cd "$(dirname "$0")/.."

if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
brew bundle check >/dev/null 2>&1 || {
echo "==> Installing Homebrew dependencies…"
brew bundle
}
fi

bundle config --local path vendor/gems

bundle check > /dev/null 2>&1 || bundle install
Expand Down

0 comments on commit 12cfef6

Please sign in to comment.