-
Notifications
You must be signed in to change notification settings - Fork 237
/
Rakefile
38 lines (30 loc) · 1014 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
require 'bundler'
require 'rake/testtask'
Bundler::GemHelper.install_tasks
desc 'check that the static libraries shipping with the gem have the same version number as the gem itself'
task :check_lib_versions do
lib_path = File.expand_path( '../frank-skeleton/libFrank.a', __FILE__)
lib_version = `what #{lib_path}`.chomp.split("\n").last.split(" ").last
puts "LIBRARY VERSION: #{lib_version}"
puts "GEM VERSION: #{Frank::Cucumber::VERSION}"
unless lib_version == Frank::Cucumber::VERSION
raise <<-EOS
RUH ROH.
static lib version doesn't match gem version.
to fix this:
(cd .. && rake build_for_release)
EOS
end
end
task :build => :check_lib_versions
desc 'open up version.rb'
task :edit_version do
exec "vim #{File.dirname(__FILE__)}/lib/frank-cucumber/version.rb"
end
task :ev => :edit_version
Rake::TestTask.new do |t|
t.libs << "test"
t.test_files = FileList['test/*_test.rb','test/*_acceptance.rb']
t.verbose = true
end
task :default => ["test"]