I've got a book that I'm developing on Github using Travis CI so that it rebuilds the book after every commit. I'm going to be doing this with a lot of books. I'd like to include .mobi files in the output of the build. I've got it working, except for one thing.
Right now I have to manually specify the ePub filename and location in the _build.sh file using the following command:
This is in contrast to the command to create the epub, which is generic enough to work on any book I would create, since it starts from the main index.Rmd file:
Is there any way for me to get the name of the epub file programmatically and insert it into the R command so that I don't have to manually look it up and change this command for every book?
I believe render_book will return as a result value the path the book. You could use that in your other command. Like instead of doing two calls to Rscript you do one with both command ? Or use an R scripts to run in travis ?