From 387eff2f9c6f310ff28ff95434961a0b6f95924d Mon Sep 17 00:00:00 2001 From: Maxim Belkin Date: Thu, 24 Jun 2021 09:49:08 -0500 Subject: [PATCH] Add .bundle/config target --- Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index ca550852..ddb104b1 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ MAKEFILES=Makefile $(wildcard *.mk) PARSER=bin/markdown_ast.rb DST=_site +# Find Bundler BUNDLE := $(shell which bundle 2>/dev/null) # Check Python 3 is installed and determine if it's called via python3 or python @@ -181,25 +182,26 @@ endif bundler : ifeq (, $(BUNDLE)) - $(error Please install Bundler using 'gem install bundler') + $(error Please install Bundler using 'gem install --user-install bundler') else @: endif +.bundle/config : bundler + @bundle config set --local path '.vendor/bundle' + ## * bundle : install Ruby gems (required for building lesson website locally) bundle : .vendor/bundle @: -.vendor/bundle: Gemfile.lock bundler +.vendor/bundle: Gemfile.lock .bundle/config bundler $(info Installing Ruby gems) - @bundle config set --local path '.vendor/bundle' @bundle install @touch .vendor/bundle ## * update-bundle : update Ruby gems (required for building lesson website locally) -update-bundle : Gemfile.lock bundler +update-bundle : Gemfile.lock .bundle/config bundler $(info Updating Ruby gems) - @bundle config set --local path '.vendor/bundle' @bundle update --quiet @touch .vendor/bundle