forked from sanichi/icu_tournament
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRakefile
42 lines (34 loc) · 1.08 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
require 'rake'
require 'rdoc/task'
require 'rspec/core/rake_task'
require File.expand_path(File.dirname(__FILE__) + '/lib/icu_tournament/version')
version = ICU::Tournament::VERSION
task :default => :spec
desc "Build a new gem for version #{version}"
task :build do
system "gem build icu_tournament.gemspec"
system "mv icu_tournament-#{version}.gem pkg"
end
desc "Release version #{version} of the gem to rubygems.org"
task :release => :build do
system "gem push pkg/icu_tournament-#{version}.gem"
end
desc "Create a tag for version #{version}"
task :tag do
system "git tag v#{version} -m 'Tagging version #{version}'"
end
desc "Push the master branch to github"
task :push do
system "git push origin master"
end
[:spec, :fcsv, :krause, :sp, :spx].each do |spec|
RSpec::Core::RakeTask.new(spec) do |t|
t.pattern = "spec/tournament_#{spec}_spec.rb" unless spec == :spec
t.rspec_opts = ['--colour --format doc']
end
end
RDoc::Task.new do |rdoc|
rdoc.title = "ICU Tournament #{version}"
rdoc.main = "README.rdoc"
rdoc.rdoc_files.include("README.rdoc", "lib/**/*.rb")
end