forked from wincent/command-t
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
68 lines (58 loc) · 1.25 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
def bail_on_failure
exitstatus = $?.exitstatus
if exitstatus != 0
raise "last command failed with exit status #{exitstatus}"
end
end
task :default => :spec
desc 'Run specs'
task :spec do
system 'bin/rspec spec'
bail_on_failure
end
desc 'Create vimball archive'
task :vimball do
system 'make'
bail_on_failure
end
desc 'Clean compiled products'
task :clean do
Dir.chdir 'ruby/command-t' do
system 'make clean'
end
end
desc 'Clobber all generated files'
task :clobber => :clean do
system 'make clean'
end
desc 'Compile extension'
task :make do
Dir.chdir 'ruby/command-t' do
ruby 'extconf.rb'
system 'make clean && make'
bail_on_failure
end
end
namespace :make do
desc 'Compile under all multiruby versions'
task :all do
system './compile-test.sh'
bail_on_failure
end
end
namespace :spec do
desc 'Run specs under all multiruby versions'
task :all do
system './multi-spec.sh'
bail_on_failure
end
end
desc 'Check that the current HEAD is tagged'
task :check_tag do
system 'git describe --exact-match HEAD 2> /dev/null'
if $?.exitstatus != 0
puts 'warning: current HEAD is not tagged'
end
end
desc 'Run checks prior to release'
task :prerelease => ['make:all', 'spec:all', :vimball, :check_tag]