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 25, 2021
1 parent 55905ee commit abf5beb
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 @@ -9,6 +9,7 @@ DST=_site
# Find Docker
DOCKER := $(shell which docker 2>/dev/null)

# 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 @@ -188,25 +189,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 abf5beb

Please sign in to comment.