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

Makefile: Prefer Ruby 2.7 if available #58

Merged
merged 1 commit into from
Mar 13, 2022
Merged
Changes from all 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
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# Prefer Ruby 2.7, github/pages-gem doesn't support 3.0 yet.
# (see https://github.com/xmonad/xmonad-web/issues/37 for details)
BUNDLE := $(firstword $(shell command -v bundle2.7 bundle-2.7) bundle)

export BUNDLE_PATH ?= $(CURDIR)/.bundle/gems

.PHONY: build
build: .bundle/.done
bundle exec jekyll build --drafts
$(BUNDLE) exec jekyll build --drafts

.PHONY: serve
serve: .bundle/.done
bundle exec jekyll serve --drafts --livereload
$(BUNDLE) exec jekyll serve --drafts --livereload

.bundle/.done: Gemfile
bundle install
$(BUNDLE) install
touch $@

.PHONY: clean
Expand Down