-
Notifications
You must be signed in to change notification settings - Fork 15
/
meta.rakefile
39 lines (33 loc) · 1.01 KB
/
meta.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
require 'rake'
load File.expand_path("../tasks/remove_task.rake", __FILE__)
# This rakefile depends on the main one and uses RVM to implement
# tasks that require multiple platforms at once.
def package_variants
%w(2.0.0 jruby)
end
begin
require 'bundler'
module Ladle
class MultiplatformGemHelper < Bundler::GemHelper
def build_gem
FileUtils.rm_rf 'pkg'
package_variants.each do |var|
sh("rvm #{var}@ladle do rake build")
end
results = Dir["pkg/*.gem"]
Bundler.ui.confirm "#{name} #{version} built to #{results.inspect}"
results
end
def rubygem_push(paths)
paths.each do |path|
Bundler.ui.confirm sh("gem push '#{path}'")
Bundler.ui.confirm "Pushed #{File.basename path} to rubygems.org"
end
end
end
end
Ladle::MultiplatformGemHelper.new(File.dirname(__FILE__)).install
remove_task(:install)
rescue LoadError
$stderr.puts "Bundler's not installed; some tasks won't be available"
end