The aim of this PR is to build each bookdown book only when one of its source files has been modified.
With git, the modification dates of the files cannot be used. So we cannot rely on make.
The _render_book_maybe.R script checks the sha of the last commit for each Rmd file and save it in the bookdown output directory.
bookdown::render_book() is executed only if one sha differs (or if there is a new Rmd file).
This script has to be used with Travis cache (this is the case here).
The aim of this PR is to build each bookdown book only when one of its source files has been modified.
With
git
, the modification dates of the files cannot be used. So we cannot rely onmake
.The
_render_book_maybe.R
script checks thesha
of the last commit for eachRmd
file and save it in the bookdown output directory.bookdown::render_book()
is executed only if onesha
differs (or if there is a newRmd
file).This script has to be used with Travis cache (this is the case here).