-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
41 lines (33 loc) · 1001 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
40
41
require 'rake/testtask'
Rake::TestTask.new do |t|
t.pattern = "test/**/*_test.rb"
end
task :coverage do
Rake::Task['collect_coverage'].invoke
`open coverage/index.html`
end
task :lint do
sh 'bundle exec rubocop -c .rubocop.yml'
end
task :collect_coverage do
ENV['COVERAGE'] = 'true'
Rake::Task['test'].invoke
end
task :build do
begin
Rake::Task['collect_coverage'].invoke
Rake::Task['lint'].invoke
rescue
puts "************************************"
puts " BUILD FAILED"
puts "************************************"
exit 1
end
end
task :build_history do
sh 'git rev-list --reverse master | while read rev; do echo "\n\n\n**************\nBUILDING $rev" && git checkout -q $rev && rake; done; git checkout master'
end
task :build_since_push do
sh 'git rev-list --reverse origin/master..master | while read rev; do echo "\n\n\n**************\nBUILDING $rev" && git checkout -q $rev && rake; done; git checkout master'
end
task default: :build