From fff9fac6d1c32ccb7a3361079fd8e195852bbcd9 Mon Sep 17 00:00:00 2001 From: Brandon Valentine Date: Wed, 14 Sep 2022 10:19:50 +0100 Subject: [PATCH 1/5] Add Brewfile for bootstrapping deps on Mac Add Brewfile Call brew bundle from script/bootstrap gitignore homebrew lockfile --- .gitignore | 1 + Brewfile | 3 +++ script/bootstrap | 7 +++++++ 3 files changed, 11 insertions(+) create mode 100644 Brewfile diff --git a/.gitignore b/.gitignore index dc1d38c58e..2ff2113c33 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ test/fixtures/ace_modes.json *.so linguist-grammars* .venv +Brewfile.lock.json diff --git a/Brewfile b/Brewfile new file mode 100644 index 0000000000..96574fb90d --- /dev/null +++ b/Brewfile @@ -0,0 +1,3 @@ +brew "cmake" +brew "pkg-config" +brew "icu4c" diff --git a/script/bootstrap b/script/bootstrap index e86baee409..c928fe7270 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -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 From f27cb3b59b8bf0bbab2d58766df5f5e0d3a09f14 Mon Sep 17 00:00:00 2001 From: Brandon Valentine Date: Wed, 14 Sep 2022 17:21:14 +0100 Subject: [PATCH 2/5] Add docker dependency to Brewfile --- Brewfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Brewfile b/Brewfile index 96574fb90d..c7cd710406 100644 --- a/Brewfile +++ b/Brewfile @@ -1,3 +1,4 @@ brew "cmake" brew "pkg-config" brew "icu4c" +cask "docker" From e4487680691d0337877d7acd4252670432d60d89 Mon Sep 17 00:00:00 2001 From: Brandon Valentine Date: Wed, 14 Sep 2022 17:23:03 +0100 Subject: [PATCH 3/5] Document presence of Brewfile --- CONTRIBUTING.md | 6 +----- README.md | 2 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e0dda9401b..955b48053b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 diff --git a/README.md b/README.md index 1888da061f..a37d0cfb15 100644 --- a/README.md +++ b/README.md @@ -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. + On Ubuntu: ```bash From fcd4bb26b62cfc95164f766e0ef0c4db6270e34c Mon Sep 17 00:00:00 2001 From: Brandon Valentine Date: Thu, 15 Sep 2022 17:22:38 +0100 Subject: [PATCH 4/5] Remove README callout to bootstrap functionality Co-authored-by: Colin Seymour --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index a37d0cfb15..bdc94cc2a2 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,6 @@ 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. On Ubuntu: From f879cd8f48eea296a4b8d46badace48cb4b89af2 Mon Sep 17 00:00:00 2001 From: Colin Seymour Date: Thu, 15 Sep 2022 17:58:12 +0100 Subject: [PATCH 5/5] Remove stray blank line --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index bdc94cc2a2..1888da061f 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,6 @@ For example, on macOS with [Homebrew](http://brew.sh/): brew install cmake pkg-config icu4c ``` - On Ubuntu: ```bash