forked from phusion/passenger_library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
23 lines (20 loc) · 755 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require_relative 'lib/constants'
desc "Build site"
task :build do
sh "bundle exec middleman build"
end
desc "Upload documentation to server"
task :rsync => [:build] do
sh "cd build && rsync -rv --progress --partial-dir=.rsync-partial --human-readable . " +
"shell.phusion.nl:/home/phusion/websites/passenger_library/"
end
desc "Check broken links"
task :checklinks do
# Ignore everything besides http://127.0.0.1:4567
non_main_domain_regex = '^(?!http:\/\/127\.0\.0\.1:4567(\/|$))'
# Ignore LiveReload stuff
livereload_regex = '^http:\/\/127\.0\.0\.1:4567\/__rack'
sh "linkchecker http://127.0.0.1:4567/" +
" --ignore-url #{Shellwords.escape non_main_domain_regex}" +
" --ignore-url #{Shellwords.escape livereload_regex}"
end