forked from Katello/katello.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
30 lines (26 loc) · 1.01 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
require 'json'
require 'open-uri'
require 'html/proofer'
namespace :test do
task :travis do
sh 'git clone https://github.com/Katello/katello.org.git -b deploy deploy'
Dir.chdir 'deploy' do
if (pr = ENV['TRAVIS_PULL_REQUEST']) && pr =~ /\A[0-9]+\z/
sh "./deploy.rb --pr #{pr}"
else
sh "./deploy.rb"
end
end
HTML::Proofer.new("./deploy/public", :href_ignore => ['#'],
:file_ignore => [/.*\/release_notes\/.*/,
/.*\/docs\/2.0.*/,
/.*\/docs\/2.1.*/,
/.*\/apidoc.*/],
:parallel => {:in_processes => 4},
:verbosity => :debug).run
end
task :local do
sh 'jekyll build'
HTML::Proofer.new("./_site", :href_ignore => ['#'], :file_ignore => ['./_site/index.html']).run
end
end