forked from driskell/log-courier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
39 lines (34 loc) · 820 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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
require 'rubygems'
task :default => [:deploy] do
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
Rake::Task[:spec].invoke
end
task :deploy do
Bundler.with_clean_env do
sh 'bundle install --deployment'
end
end
task :update do
Bundler.with_clean_env do
sh 'bundle install --no-deployment --path .bundle'
end
end
task :docs do
sh 'npm --version >/dev/null' do |ok|
next if ok
fail %('npm' not found. You need to install node.js.)
end
sh 'npm install >/dev/null' do |ok|
next if ok
fail 'Failed to perform local install of doctoc.'
end
sh 'node_modules/.bin/doctoc README.md'
Rake::FileList['docs/*.md', 'docs/codecs/*.md'].each do |file|
sh 'node_modules/.bin/doctoc ' + file
end
end
task :clean do
sh 'rm -rf .bundle'
sh 'rm -rf vendor'
end