Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add brewfile to bootstrap #6068

Merged
merged 6 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ For example, on macOS with [Homebrew](http://brew.sh/):
brew install cmake pkg-config icu4c
```

If you are on macOS and run `script/bootstrap` in this repository, those dependencies will be installed for you provided Homebrew is available.
bval marked this conversation as resolved.
Show resolved Hide resolved

lildude marked this conversation as resolved.
Show resolved Hide resolved
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
bval marked this conversation as resolved.
Show resolved Hide resolved
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