-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathRakefile
46 lines (36 loc) · 1.46 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
require "bundler" #don't use bundler right now because it runs these rake tasks differently
Bundler.setup
require "rake"
require "rspec/core/rake_task"
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
require "openstudio/recommendation_engine/recommendation_engine"
require "openstudio/recommendation_engine/version"
task :gem => :build
desc "build gem"
task :build do
system "gem build openstudio-recommendation-engine.gemspec"
end
desc "install gem from local build"
task :install => :build do
system "gem install openstudio-recommendation-engine-#{OpenStudio::RecommendationEngine::VERSION}.gem --no-ri --no-rdoc"
end
desc "build and release version of gem on rubygems.org"
task :release => :build do
system "git tag -a v#{OpenStudio::RecommendationEngine::VERSION} -m 'Tagging #{OpenStudio::RecommendationEngine::VERSION}'"
system "git push --tags"
system "gem push openstudio-recommendation-engine-#{OpenStudio::RecommendationEngine::VERSION}.gem"
system "rm openstudio-recommendation-engine-#{OpenStudio::RecommendationEngine::VERSION}.gem"
end
desc "uninstall all gems"
task :uninstall do
system "gem uninstall openstudio-recommendation-engine -a"
end
task :reinstall => [:uninstall, :install]
RSpec::Core::RakeTask.new("spec") do |spec|
puts "running tests..."
spec.rspec_opts = %w(--format progress --format CI::Reporter::RSpec)
spec.pattern = "spec/**/*_spec.rb"
end
desc "Default task run rspec tests"
task :test => :spec
task :default => :spec