Skip to content

Commit

Permalink
Add .bundle/config target
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim-belkin committed Jun 24, 2021
1 parent f3d50e8 commit 387eff2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 387eff2

Please sign in to comment.