forked from mongodb/mongo-ruby-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
43 lines (34 loc) · 965 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
42
43
#!/usr/bin/env ruby
require 'rubygems'
begin
require 'bundler'
require 'bundler/gem_tasks'
rescue LoadError
raise '[FAIL] Bundler not found! Install it with ' +
'`gem install bundler; bundle install`.'
end
default_groups = [:default, :testing]
Bundler.require(*default_groups)
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
task :default => :spec
namespace :spec do
task :ci => [:spec]
end
task :release => :spec do
system "git tag -a #{Mongo::VERSION} -m 'Tagging release: #{Mongo::VERSION}'"
system "git push --tags"
system "gem build mongo.gemspec"
system "gem push mongo-#{Mongo::VERSION}.gem"
system "rm mongo-#{Mongo::VERSION}.gem"
end
desc "Generate all documentation"
task :docs => 'docs:yard'
namespace :docs do
desc "Generate yard documention"
task :yard do
out = File.join('docs', Mongo::VERSION)
FileUtils.rm_rf(out)
system "yardoc -o #{out} --title mongo-#{Mongo::VERSION}"
end
end