-
Notifications
You must be signed in to change notification settings - Fork 13
/
Rakefile
43 lines (35 loc) · 1.07 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
require File.expand_path('../lib/elastictastic/version', __FILE__)
require 'rspec/core/rake_task'
task :default => :release
task :release => [:test, :build, :tag, :update_stable, :push, :cleanup]
desc 'Build gem'
task :build do
system 'gem build elastictastic.gemspec'
end
desc 'Create git release tag'
task :tag do
system "git tag -a -m 'Version #{Elastictastic::VERSION}' #{Elastictastic::VERSION}"
system "git push origin #{Elastictastic::VERSION}:#{Elastictastic::VERSION}"
end
desc 'Update stable branch on GitHub'
task :update_stable do
if Elastictastic::VERSION =~ /^(\d+\.)+\d+$/ # Don't push for prerelease
system "git push -f origin HEAD:stable"
end
end
desc 'Push gem to rubygems.org'
task :push do
system "gem push elastictastic-#{Elastictastic::VERSION}.gem"
end
task 'Push gem to geminabox'
task :inabox do
system "gem inabox elastictastic-#{Elastictastic::VERSION}.gem"
end
task 'Remove packaged gems'
task :cleanup do
system "rm -v *.gem"
end
desc 'Run the specs'
task :test do
abort unless system 'bundle', 'exec', 'rspec', 'spec/examples'
end