X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/0b8673b62cd9717fcf7e3bbb608ae07018093d6f..25b62d2b7ba5273928ee98085fa2f4674caa67e6:/doc/Rakefile diff --git a/doc/Rakefile b/doc/Rakefile index ab5a2ea5e2..eaa5410100 100644 --- a/doc/Rakefile +++ b/doc/Rakefile @@ -1,9 +1,12 @@ #!/usr/bin/env rake +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: CC-BY-SA-3.0 require "rubygems" require "colorize" -task :generate => [ :realclean, 'sdk/python/arvados/index.html' ] do +task :generate => [ :realclean, 'sdk/python/arvados/index.html', 'sdk/R/arvados/index.html' ] do vars = ['baseurl', 'arvados_api_host', 'arvados_workbench_host'] vars.each do |v| if ENV[v] @@ -22,6 +25,19 @@ file "sdk/python/arvados/index.html" do |t| end end +file "sdk/R/arvados/index.html" do |t| + `which R` + if $? == 0 + Dir.chdir("../sdk/R/") do + STDERR.puts `R --quiet --vanilla -e 'pkgdown::build_site()' 2>&1` + end + raise if $? != 0 + cp_r("../sdk/R/docs", "sdk/R/arvados") + else + puts "Warning: R not found, R documentation will not be generated".colorize(:light_red) + end +end + task :linkchecker => [ :generate ] do Dir.chdir(".site") do `which linkchecker` @@ -35,6 +51,8 @@ end task :clean do rm_rf "sdk/python/arvados" + rm_rf "sdk/R/arvados" + rm_rf "../sdk/R/docs" end require "zenweb/tasks"