enabled rake docs for ubuntu
This commit is contained in:
18
rakefile
18
rakefile
@@ -169,7 +169,7 @@ Dir["common/lib/*"].select{|lib| File.directory?(lib)}.each do |lib|
|
||||
TEST_TASK_DIRS << lib
|
||||
|
||||
desc "Run tests for common lib #{lib} (without coverage)"
|
||||
task "fasttest_#{lib}" do
|
||||
task "fasttest_#{lib}" do
|
||||
sh("nosetests #{lib}")
|
||||
end
|
||||
|
||||
@@ -309,16 +309,22 @@ task :builddocs do
|
||||
end
|
||||
end
|
||||
|
||||
desc "Show doc in browser (mac only for now) TODO add linux support"
|
||||
desc "Show docs in browser (mac and ubuntu)."
|
||||
task :showdocs do
|
||||
Dir.chdir('docs/build/html') do
|
||||
sh('open index.html')
|
||||
if RUBY_PLATFORM.include? 'darwin' # mac os
|
||||
sh('open index.html')
|
||||
elsif RUBY_PLATFORM.include? 'linux' # make more ubuntu specific?
|
||||
sh('sens-browser index.html') # ubuntu
|
||||
else
|
||||
raise "\nUndefined how to run browser on your machine.
|
||||
Please use 'rake builddocs' and then manually open
|
||||
'mitx/docs/build/html/index.html."
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
desc "Build docs and show them in browser"
|
||||
task :doc => :builddocs do
|
||||
Dir.chdir('docs/build/html') do
|
||||
sh('open index.html')
|
||||
end
|
||||
Rake::Task["showdocs"].invoke
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user