X-Git-Url: https://git.arvados.org/rnaseq-cwl-training.git/blobdiff_plain/e986d1a3e304dfd6b172282cd0eeeb78fe19ce7a..HEAD:/Makefile diff --git a/Makefile b/Makefile index c2b1853..09d2d34 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,9 @@ -# Use /bin/bash instead of /bin/sh -export SHELL = /bin/bash - ## ======================================== ## Commands for both workshop and lesson websites. # Settings MAKEFILES=Makefile $(wildcard *.mk) -JEKYLL_VERSION=3.8.5 -JEKYLL=bundle install --path .vendor/bundle && bundle update && bundle exec jekyll +JEKYLL=bundle config --local set path .vendor/bundle && bundle install && bundle update && bundle exec jekyll PARSER=bin/markdown_ast.rb DST=_site @@ -54,11 +50,14 @@ site : lesson-md ## * docker-serve : use Docker to serve the site docker-serve : - docker run --rm -it --volume ${PWD}:/srv/jekyll \ - --volume=${PWD}/.docker-vendor/bundle:/usr/local/bundle \ - -p 127.0.0.1:4000:4000 \ - jekyll/jekyll:${JEKYLL_VERSION} \ - bin/run-make-docker-serve.sh + docker pull carpentries/lesson-docker:latest + docker run --rm -it \ + -v $${PWD}:/home/rstudio \ + -p 4000:4000 \ + -p 8787:8787 \ + -e USERID=$$(id -u) \ + -e GROUPID=$$(id -g) \ + carpentries/lesson-docker:latest ## * repo-check : check repository settings repo-check : @@ -94,10 +93,10 @@ workshop-check : ## III. Commands specific to lesson websites ## ================================================= -.PHONY : lesson-check lesson-md lesson-files lesson-fixme +.PHONY : lesson-check lesson-md lesson-files lesson-fixme install-rmd-deps # RMarkdown files -RMD_SRC = $(wildcard _episodes_rmd/??-*.Rmd) +RMD_SRC = $(wildcard _episodes_rmd/*.Rmd) RMD_DST = $(patsubst _episodes_rmd/%.Rmd,_episodes/%.md,$(RMD_SRC)) # Lesson source files in the order they appear in the navigation menu. @@ -108,7 +107,8 @@ MARKDOWN_SRC = \ $(sort $(wildcard _episodes/*.md)) \ reference.md \ $(sort $(wildcard _extras/*.md)) \ - LICENSE.md + LICENSE.md \ + CONTRIBUTING.md # Generated lesson files in the order they appear in the navigation menu. HTML_DST = \ @@ -116,17 +116,22 @@ HTML_DST = \ ${DST}/conduct/index.html \ ${DST}/setup/index.html \ $(patsubst _episodes/%.md,${DST}/%/index.html,$(sort $(wildcard _episodes/*.md))) \ - ${DST}/reference/index.html \ + ${DST}/reference.html \ $(patsubst _extras/%.md,${DST}/%/index.html,$(sort $(wildcard _extras/*.md))) \ ${DST}/license/index.html +## * install-rmd-deps : Install R packages dependencies to build the RMarkdown lesson +install-rmd-deps: + @${SHELL} bin/install_r_deps.sh + ## * lesson-md : convert Rmarkdown files to markdown lesson-md : ${RMD_DST} -_episodes/%.md: _episodes_rmd/%.Rmd +_episodes/%.md: _episodes_rmd/%.Rmd install-rmd-deps + @mkdir -p _episodes @bin/knit_lessons.sh $< $@ -# * lesson-check : validate lesson Markdown +## * lesson-check : validate lesson Markdown lesson-check : lesson-fixme @${PYTHON} bin/lesson_check.py -s . -p ${PARSER} -r _includes/links.md @@ -147,7 +152,7 @@ lesson-files : ## * lesson-fixme : show FIXME markers embedded in source files lesson-fixme : - @fgrep -i -n FIXME ${MARKDOWN_SRC} || true + @grep --fixed-strings --word-regexp --line-number --no-messages FIXME ${MARKDOWN_SRC} || true ## ## IV. Auxililary (plumbing) commands