/
Rakefile
56 lines (41 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
44
45
46
47
48
49
50
51
52
53
54
55
56
# Copyright (c) 2009-2012 VMware, Inc.
$:.unshift(File.expand_path("../../rake", __FILE__))
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __FILE__)
require "rubygems"
require "bundler"
Bundler.setup(:default, :test)
require "rake"
begin
require "rspec/core/rake_task"
rescue LoadError
end
require "bundler_task"
require "ci_task"
if defined?(RSpec)
namespace :spec do
SPEC_OPTS = %w(--format progress --colour)
desc "Run unit tests"
unit_rspec_task = RSpec::Core::RakeTask.new(:unit) do |t|
t.pattern = "spec/unit/**/*_spec.rb"
t.rspec_opts = SPEC_OPTS
end
CiTask.new do |task|
task.rspec_task = unit_rspec_task
end
end
desc "Run tests"
task :spec => %w(spec:unit)
desc "Run tests for CIs"
task "spec:ci" => %w(spec:unit:ci)
end
BundlerTask.new
gem_helper = Bundler::GemHelper.new(Dir.pwd)
desc "Build BOSH CLI gem into the pkg directory"
task "build" do
gem_helper.build_gem
end
desc "Build and install BOSH CLI into system gems"
task "install" do
gem_helper.install_gem
end
task :install_head => :install