-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathRakefile
30 lines (25 loc) · 802 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
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
require "chef/handler/mail/version"
GEM_NAME = "chef-handler-mail"
GEM_VERSION = MailHandler::VERSION
desc "Build #{GEM_NAME} gem"
task :build do
system "gem build #{GEM_NAME}.gemspec"
system "mkdir -p /tmp/chef-handler-mail-build"
system "cp #{GEM_NAME}-#{GEM_VERSION}.gem /tmp/chef-handler-mail-build/#{GEM_NAME}.gem"
end
desc "Push #{GEM_NAME} to rubygems.org"
task :push => :build do
system "gem push #{GEM_NAME}-#{GEM_VERSION}.gem"
end
desc "Clean up build gems"
task :clean do
system "rm -f #{GEM_NAME}-#{GEM_VERSION}.gem"
system "rm -f test/build/#{GEM_NAME}.gem"
end
begin
require 'kitchen/rake_tasks'
Kitchen::RakeTasks.new
rescue LoadError
puts ">>>>> Kitchen gem not loaded, omitting tasks" unless ENV['CI']
end