From c9bdf04889a968a90c25cdbf720d05a2a0c78f69 Mon Sep 17 00:00:00 2001 From: Eric Franz Date: Fri, 29 Sep 2017 10:51:13 -0400 Subject: [PATCH] add rakefile for convenient builds --- Rakefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Rakefile diff --git a/Rakefile b/Rakefile new file mode 100644 index 000000000..86fad5b45 --- /dev/null +++ b/Rakefile @@ -0,0 +1,28 @@ +# task default: %w[build] + +task :default do + system "rake --tasks" +end + +namespace :pipenv do + desc "Build docs using pipenv" + task :build do + exec 'WORKDIR=/doc PIPENV_VENV_IN_PROJECT=1 pipenv run make html' + end + + desc "Install pipenv dependencies" + task :install do + exec 'WORKDIR=/doc PIPENV_VENV_IN_PROJECT=1 pipenv install' + end +end + +namespace :docker do + + desc "Build docs using docker" + task :build do + exec 'docker run --rm -i -t -v "${PWD}:/doc" -u "$(id -u):$(id -g)" ohiosupercomputer/docker-sphinx make html' + end +end + +desc "Build docs using pipenv (shortcut)" +task :build => ["pipenv:build"]