puppet 2.7.23 → 2.7.24

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of puppet might be problematic. Click here for more details.

Files changed (43) hide show
  1. data/Gemfile +23 -7
  2. data/ext/packaging/LICENSE +17 -0
  3. data/ext/packaging/README.md +92 -18
  4. data/ext/packaging/spec/tasks/00_utils_spec.rb +28 -21
  5. data/ext/packaging/spec/tasks/build_object_spec.rb +6 -4
  6. data/ext/packaging/static_artifacts/PackageInfo.plist +3 -0
  7. data/ext/packaging/tasks/00_utils.rake +91 -15
  8. data/ext/packaging/tasks/10_setupvars.rake +39 -24
  9. data/ext/packaging/tasks/20_setupextravars.rake +1 -5
  10. data/ext/packaging/tasks/30_metrics.rake +29 -37
  11. data/ext/packaging/tasks/apple.rake +8 -6
  12. data/ext/packaging/tasks/build.rake +6 -0
  13. data/ext/packaging/tasks/deb.rake +1 -4
  14. data/ext/packaging/tasks/fetch.rake +22 -12
  15. data/ext/packaging/tasks/gem.rake +88 -35
  16. data/ext/packaging/tasks/jenkins.rake +25 -1
  17. data/ext/packaging/tasks/jenkins_dynamic.rake +10 -1
  18. data/ext/packaging/tasks/mock.rake +37 -19
  19. data/ext/packaging/tasks/pe_ship.rake +108 -10
  20. data/ext/packaging/tasks/pe_sign.rake +3 -3
  21. data/ext/packaging/tasks/retrieve.rake +12 -0
  22. data/ext/packaging/tasks/rpm_repos.rake +2 -2
  23. data/ext/packaging/tasks/ship.rake +51 -12
  24. data/ext/packaging/tasks/sign.rake +42 -12
  25. data/ext/packaging/tasks/tar.rake +1 -1
  26. data/ext/packaging/tasks/template.rake +17 -3
  27. data/ext/packaging/tasks/vendor_gems.rake +1 -1
  28. data/ext/packaging/templates/downstream.xml.erb +15 -2
  29. data/ext/packaging/templates/packaging.xml.erb +143 -1
  30. data/ext/packaging/templates/repo.xml.erb +35 -24
  31. data/lib/puppet/transaction.rb +1 -1
  32. data/lib/puppet/type/file.rb +12 -23
  33. data/lib/puppet/type/file/source.rb +2 -2
  34. data/lib/puppet/type/service.rb +3 -2
  35. data/lib/puppet/util.rb +22 -41
  36. data/lib/puppet/version.rb +1 -1
  37. data/spec/integration/type/file_spec.rb +22 -35
  38. data/spec/spec_helper.rb +12 -0
  39. data/spec/unit/application/kick_spec.rb +9 -4
  40. data/spec/unit/indirector/catalog/static_compiler_spec.rb +1 -1
  41. data/spec/unit/type/file/source_spec.rb +8 -7
  42. data/spec/unit/type/file_spec.rb +0 -29
  43. metadata +64 -39
@@ -32,30 +32,31 @@ end
32
32
  # variables are called out specifically because they are likely to require
33
33
  # overriding in at least some cases.
34
34
  #
35
- @build.sign_tar = boolean_value(ENV['SIGN_TAR']) if ENV['SIGN_TAR']
36
- @build.build_gem = boolean_value(ENV['GEM']) if ENV['GEM']
37
- @build.build_dmg = boolean_value(ENV['DMG']) if ENV['DMG']
38
- @build.build_ips = boolean_value(ENV['IPS']) if ENV['IPS']
39
- @build.build_doc = boolean_value(ENV['DOC']) if ENV['DOC']
40
- @build.build_pe = boolean_value(ENV['PE_BUILD']) if ENV['PE_BUILD']
41
- @build.debug = boolean_value(ENV['DEBUG']) if ENV['DEBUG']
42
- @build.default_cow = ENV['COW'] if ENV['COW']
43
- @build.cows = ENV['COW'] if ENV['COW']
44
- @build.pbuild_conf = ENV['PBUILDCONF'] if ENV['PBUILDCONF']
45
- @build.packager = ENV['PACKAGER'] if ENV['PACKAGER']
46
- @build.default_mock = ENV['MOCK'] if ENV['MOCK']
47
- @build.final_mocks = ENV['MOCK'] if ENV['MOCK']
48
- @build.rc_mocks = ENV['MOCK'] if ENV['MOCK']
49
- @build.gpg_name = ENV['GPG_NAME'] if ENV['GPG_NAME']
50
- @build.gpg_key = ENV['GPG_KEY'] if ENV['GPG_KEY']
51
- @build.certificate_pem = ENV['CERT_PEM'] if ENV['CERT_PEM']
52
- @build.privatekey_pem = ENV['PRIVATE_PEM'] if ENV['PRIVATE_PEM']
53
- @build.yum_host = ENV['YUM_HOST'] if ENV['YUM_HOST']
54
- @build.yum_repo_path = ENV['YUM_REPO'] if ENV['YUM_REPO']
55
- @build.apt_host = ENV['APT_HOST'] if ENV['APT_HOST']
56
- @build.apt_repo_path = ENV['APT_REPO'] if ENV['APT_REPO']
57
- @build.pe_version = ENV['PE_VER'] if ENV['PE_VER']
58
- @build.notify = ENV['NOTIFY'] if ENV['NOTIFY']
35
+ @build.sign_tar = boolean_value(ENV['SIGN_TAR']) if ENV['SIGN_TAR']
36
+ @build.build_gem = boolean_value(ENV['GEM']) if ENV['GEM']
37
+ @build.build_dmg = boolean_value(ENV['DMG']) if ENV['DMG']
38
+ @build.build_ips = boolean_value(ENV['IPS']) if ENV['IPS']
39
+ @build.build_doc = boolean_value(ENV['DOC']) if ENV['DOC']
40
+ @build.build_pe = boolean_value(ENV['PE_BUILD']) if ENV['PE_BUILD']
41
+ @build.debug = boolean_value(ENV['DEBUG']) if ENV['DEBUG']
42
+ @build.update_version_file = ENV['NEW_STYLE_PACKAGE'] if ENV['NEW_STYLE_PACKAGE']
43
+ @build.default_cow = ENV['COW'] if ENV['COW']
44
+ @build.cows = ENV['COW'] if ENV['COW']
45
+ @build.pbuild_conf = ENV['PBUILDCONF'] if ENV['PBUILDCONF']
46
+ @build.packager = ENV['PACKAGER'] if ENV['PACKAGER']
47
+ @build.default_mock = ENV['MOCK'] if ENV['MOCK']
48
+ @build.final_mocks = ENV['MOCK'] if ENV['MOCK']
49
+ @build.rc_mocks = ENV['MOCK'] if ENV['MOCK']
50
+ @build.gpg_name = ENV['GPG_NAME'] if ENV['GPG_NAME']
51
+ @build.gpg_key = ENV['GPG_KEY'] if ENV['GPG_KEY']
52
+ @build.certificate_pem = ENV['CERT_PEM'] if ENV['CERT_PEM']
53
+ @build.privatekey_pem = ENV['PRIVATE_PEM'] if ENV['PRIVATE_PEM']
54
+ @build.yum_host = ENV['YUM_HOST'] if ENV['YUM_HOST']
55
+ @build.yum_repo_path = ENV['YUM_REPO'] if ENV['YUM_REPO']
56
+ @build.apt_host = ENV['APT_HOST'] if ENV['APT_HOST']
57
+ @build.apt_repo_path = ENV['APT_REPO'] if ENV['APT_REPO']
58
+ @build.pe_version = ENV['PE_VER'] if ENV['PE_VER']
59
+ @build.notify = ENV['NOTIFY'] if ENV['NOTIFY']
59
60
 
60
61
  ##
61
62
  # These parameters are either generated dynamically by the project, or aren't
@@ -89,6 +90,20 @@ end
89
90
  # @tar_host isn't set.
90
91
  @build.tar_host ||= @build.yum_host
91
92
 
93
+ # Though undocumented, we had specified gem_devel_dependencies as an allowed
94
+ # parameter for @build, and it was supposed to correspond with
95
+ # gem_development_dependencies in a gem spec. It was dumb to call it 'devel'
96
+ # instead of 'development', which would have been a cleaner mapping. Here, we
97
+ # deprecate this.
98
+ if @build.gem_devel_dependencies
99
+ @build.gem_development_dependencies = @build.gem_devel_dependencies
100
+ warn "
101
+ DEPRECATED, 9-Nov-2013: 'gem_devel_dependencies' has been replaced with
102
+ 'gem_development_dependencies.' Please update this field in your
103
+ project_data.yaml
104
+ "
105
+ end
106
+
92
107
  if @build.debug
93
108
  @build.print_params
94
109
  end
@@ -10,8 +10,7 @@ namespace :pl do
10
10
  unless ENV['PARAMS_FILE'] && ENV['PARAMS_FILE'] != ''
11
11
  tempdir = args.tempdir
12
12
  raise "pl:load_extras requires a directory containing extras data" if tempdir.nil?
13
- @build.set_params_from_file("#{tempdir}/team/#{@build.builder_data_file}")
14
- @build.set_params_from_file("#{tempdir}/project/#{@build.builder_data_file}")
13
+ @build.set_params_from_file("#{tempdir}/#{@build.builder_data_file}")
15
14
  # Overrideable
16
15
  @build.build_pe = boolean_value(ENV['PE_BUILD']) if ENV['PE_BUILD']
17
16
  # right now, puppetdb is the only one to override these, because it needs
@@ -27,9 +26,6 @@ namespace :pl do
27
26
  end
28
27
  end
29
28
  end
30
- if @build.team == 'release'
31
- @build.benchmark = TRUE
32
- end
33
29
 
34
30
  ##
35
31
  # Starting with puppetdb, we'll maintain two separate build-data files, one for
@@ -1,41 +1,33 @@
1
- if @build.benchmark
2
- @metrics = []
3
- @pg_major_version = nil
4
- @db_table = 'metrics'
5
-
6
- def add_metrics args
7
- @metrics << {
8
- :bench => args[:bench],
9
- :dist => ( args[:dist] || ENV['DIST'] ),
10
- :pkg => ( args[:pkg] || @build.project ),
11
- :version => ( args[:version] || @build.version ),
12
- :pe_version => ( args[:pe_version] || @build.pe_version ),
13
- :date => ( args[:date] || timestamp ),
14
- :who => ( args[:who] || ENV['USER'] ),
15
- :where => ( args[:where] || hostname )
16
- }
17
- end
1
+ @metrics = []
2
+ def add_shipped_metrics args
3
+ @metrics << {
4
+ :type => 'shipped',
5
+ :package => ( args[:package] || @build.project ),
6
+ :version => ( args[:version] || @build.version ),
7
+ :pe_version => ( args[:pe_version] || @build.pe_version ),
8
+ :is_rc => ( args[:is_rc] || false ),
9
+ }
10
+ end
18
11
 
19
- def post_metrics
20
- if psql = find_tool('psql')
21
- ENV["PGCONNECT_TIMEOUT"]="10"
12
+ def post_shipped_metrics
13
+ require 'net/http'
14
+ @metrics.each do |metric|
15
+ type = metric[:type]
16
+ package = metric[:package]
17
+ version = metric[:version]
18
+ pe_version = metric[:pe_version]
19
+ is_rc = metric[:is_rc]
22
20
 
23
- @metrics.each do |metric|
24
- date = metric[:date]
25
- pkg = metric[:pkg]
26
- dist = metric[:dist]
27
- bench = metric[:bench]
28
- who = metric[:who]
29
- where = metric[:where]
30
- version = metric[:version]
31
- pe_version = metric[:pe_version]
32
- @pg_major_version ||= %x{/usr/bin/psql --version}.match(/psql \(PostgreSQL\) (\d)\..*/)[1].to_i
33
- no_pass_fail = "-w" if @pg_major_version > 8
34
- %x{#{psql} #{no_pass_fail} -c "INSERT INTO #{@db_table} \
35
- (date, package, dist, build_time, build_user, build_loc, version, pe_version) \
36
- VALUES ('#{date}', '#{pkg}', '#{dist}', #{bench}, '#{who}', '#{where}', '#{version}', '#{pe_version}')"}
37
- end
38
- @metrics = []
39
- end
21
+ uri = URI(@build.metrics_url)
22
+ res = Net::HTTP.post_form(
23
+ uri,
24
+ {
25
+ 'type' => type,
26
+ 'package' => package,
27
+ 'version' => version,
28
+ 'pe_version' => pe_version,
29
+ 'is_rc' => is_rc,
30
+ }
31
+ )
40
32
  end
41
33
  end
@@ -32,7 +32,8 @@ task :setup do
32
32
  @build_date = Time.new.strftime("%Y-%m-%dT%H:%M:%SZ")
33
33
  @apple_bindir = '/usr/bin'
34
34
  @apple_sbindir = '/usr/sbin'
35
- @apple_libdir = '/usr/lib/ruby/site_ruby/1.8'
35
+ @apple_libdir = '/usr/lib/ruby/site_ruby'
36
+ @apple_old_libdir = '/usr/lib/ruby/site_ruby/1.8'
36
37
  @apple_docdir = '/usr/share/doc'
37
38
  end
38
39
 
@@ -68,6 +69,10 @@ def make_directory_tree
68
69
  erb 'ext/osx/prototype.plist.erb', "#{@scratch}/prototype.plist"
69
70
  end
70
71
 
72
+ if File.exists?('ext/packaging/static_artifacts/PackageInfo.plist')
73
+ cp 'ext/packaging/static_artifacts/PackageInfo.plist', "#{@scratch}/PackageInfo.plist"
74
+ end
75
+
71
76
  end
72
77
 
73
78
  # method: build_dmg
@@ -86,7 +91,6 @@ def build_dmg
86
91
  dmg_format = "#{dmg_format_code} #{dmg_format_option}"
87
92
  dmg_file = "#{@title}.dmg"
88
93
  package_file = "#{@title}.pkg"
89
- package_target_os = '10.4'
90
94
 
91
95
  # Build .pkg file
92
96
  system("sudo #{PKGBUILD} --root #{@working_tree['working']} \
@@ -95,6 +99,7 @@ def build_dmg
95
99
  --version #{@version} \
96
100
  --install-location / \
97
101
  --ownership preserve \
102
+ --info #{@scratch}/PackageInfo.plist \
98
103
  #{@working_tree['payload']}/#{package_file}")
99
104
 
100
105
  # Build .dmg file
@@ -235,10 +240,7 @@ if @build.build_dmg
235
240
  pack_source
236
241
  build_dmg
237
242
  end
238
- if @build.benchmark
239
- add_metrics({ :dist => 'osx', :bench => bench })
240
- post_metrics
241
- end
243
+ puts "Finished building in: #{bench}"
242
244
  end
243
245
  end
244
246
 
@@ -38,11 +38,13 @@ module Build
38
38
  :gem_dependencies,
39
39
  :gem_description,
40
40
  :gem_devel_dependencies,
41
+ :gem_development_dependencies,
41
42
  :gem_excludes,
42
43
  :gem_executables,
43
44
  :gem_files,
44
45
  :gem_forge_project,
45
46
  :gem_name,
47
+ :gem_platform_dependencies,
46
48
  :gem_rdoc_options,
47
49
  :gem_require_path,
48
50
  :gem_runtime_dependencies,
@@ -64,6 +66,7 @@ module Build
64
66
  :jenkins_packaging_job,
65
67
  :jenkins_repo_path,
66
68
  :metrics,
69
+ :metrics_url,
67
70
  :name,
68
71
  :notify,
69
72
  :project,
@@ -92,8 +95,11 @@ module Build
92
95
  :tarball_path,
93
96
  :task,
94
97
  :team,
98
+ :templates,
99
+ :update_version_file,
95
100
  :version,
96
101
  :version_file,
102
+ :version_strategy,
97
103
  :yum_host,
98
104
  :yum_repo_path]
99
105
 
@@ -57,8 +57,7 @@ task :build_deb, :deb_command, :cow do |t,args|
57
57
  rm_rf work_dir
58
58
  end
59
59
  end
60
- # See 30_metrics.rake to see what this is doing
61
- add_metrics({ :dist => ENV['DIST'], :bench => bench }) if @build.benchmark
60
+ puts "Finished building in: #{bench}"
62
61
  end
63
62
 
64
63
  namespace :package do
@@ -73,7 +72,6 @@ namespace :pl do
73
72
  task :deb => "package:tar" do
74
73
  check_var('PE_VER', @build.pe_version) if @build.build_pe
75
74
  Rake::Task[:build_deb].invoke('pdebuild', @build.default_cow)
76
- post_metrics if @build.benchmark
77
75
  end
78
76
 
79
77
  desc "Create debs from this git repository using all cows specified in build_defaults yaml"
@@ -84,6 +82,5 @@ namespace :pl do
84
82
  Rake::Task[:build_deb].reenable
85
83
  Rake::Task[:build_deb].invoke('pdebuild', cow)
86
84
  end
87
- post_metrics if @build.benchmark
88
85
  end
89
86
  end
@@ -29,20 +29,30 @@ namespace :pl do
29
29
  rm_rf "#{ENV['HOME']}/.packaging" if File.directory?("#{ENV['HOME']}/.packaging")
30
30
  # Touch the .packaging file which is allows packaging to present remote tasks
31
31
  touch "#{ENV['HOME']}/.packaging"
32
- tempdir = get_temp
33
- mkdir_pr("#{tempdir}/team", "#{tempdir}/project")
34
- begin
35
- if dist = el_version
36
- if dist.to_i < 6
37
- flag = "-k"
32
+ if dist = el_version
33
+ if dist.to_i < 6
34
+ flag = "-k"
35
+ end
36
+ end
37
+ [project_data_url, team_data_url].each do |url|
38
+ begin
39
+ tempdir = get_temp
40
+ %x{curl --fail --silent #{flag} #{url}/#{@build.builder_data_file} > #{tempdir}/#{@build.builder_data_file}}
41
+ case $?.exitstatus
42
+ when 0
43
+ invoke_task("pl:load_extras", tempdir)
44
+ when 22
45
+ if url == team_data_url
46
+ fail "Could not load team extras data from #{url}. This should not normally happen"
47
+ else
48
+ puts "No build data file for #{@build.project}, skipping load of extra build data."
49
+ end
50
+ else
51
+ fail "There was an error fetching the builder extras data from #{url}."
38
52
  end
53
+ ensure
54
+ rm_rf tempdir
39
55
  end
40
- sh "curl #{flag} #{project_data_url}/#{@build.builder_data_file} > #{tempdir}/project/#{@build.builder_data_file}"
41
- sh "curl #{flag} #{team_data_url}/#{@build.builder_data_file} > #{tempdir}/team/#{@build.builder_data_file}"
42
- invoke_task("pl:load_extras", tempdir)
43
- rm_rf(tempdir)
44
- rescue
45
- fail "There was an error fetching the builder extras data."
46
56
  end
47
57
  end
48
58
  end
@@ -24,50 +24,103 @@ if @build.build_gem
24
24
  gem_files = gem_files - gem_excludes_file_list
25
25
  end
26
26
 
27
- spec = Gem::Specification.new do |s|
28
- s.name = @build.project unless @build.project.nil?
29
- s.name = @build.gem_name unless @build.gem_name.nil?
30
- s.version = @build.gemversion unless @build.gemversion.nil?
31
- s.author = @build.author unless @build.author.nil?
32
- s.email = @build.email unless @build.email.nil?
33
- s.homepage = @build.homepage unless @build.homepage.nil?
34
- s.summary = @build.summary unless @build.summary.nil?
35
- s.summary = @build.gem_summary unless @build.gem_summary.nil?
36
- s.description = @build.description unless @build.description.nil?
37
- s.description = @build.gem_description unless @build.gem_description.nil?
38
- s.files = glob_gem_files unless glob_gem_files.nil?
39
- s.executables = @build.gem_executables unless @build.gem_executables.nil?
40
- s.require_path = @build.gem_require_path unless @build.gem_require_path.nil?
41
- s.test_files = FileList[@build.gem_test_files.split(' ')] unless @build.gem_test_files.nil?
42
- s.rubyforge_project = @build.gem_forge_project unless @build.gem_forge_project.nil?
27
+ def add_gem_dependency(opts = {})
28
+ spec = opts[:spec]
29
+ version = opts[:version]
30
+ type = opts[:type].to_s
31
+ gem = opts[:gem].to_s
32
+ if opts[:version].nil? or opts[:version].empty?
33
+ spec.send("add_#{type}_dependency".to_sym, gem)
34
+ else
35
+ spec.send("add_#{type}_dependency".to_sym, gem, version)
36
+ end
37
+ spec
38
+ end
39
+
40
+ def create_default_gem_spec
41
+ spec = Gem::Specification.new do |s|
42
+ s.name = @build.project unless @build.project.nil?
43
+ s.name = @build.gem_name unless @build.gem_name.nil?
44
+ s.version = @build.gemversion unless @build.gemversion.nil?
45
+ s.author = @build.author unless @build.author.nil?
46
+ s.email = @build.email unless @build.email.nil?
47
+ s.homepage = @build.homepage unless @build.homepage.nil?
48
+ s.summary = @build.summary unless @build.summary.nil?
49
+ s.summary = @build.gem_summary unless @build.gem_summary.nil?
50
+ s.description = @build.description unless @build.description.nil?
51
+ s.description = @build.gem_description unless @build.gem_description.nil?
52
+ s.files = glob_gem_files unless glob_gem_files.nil?
53
+ s.executables = @build.gem_executables unless @build.gem_executables.nil?
54
+ s.require_path = @build.gem_require_path unless @build.gem_require_path.nil?
55
+ s.test_files = FileList[@build.gem_test_files.split(' ')] unless @build.gem_test_files.nil?
56
+ s.rubyforge_project = @build.gem_forge_project unless @build.gem_forge_project.nil?
57
+ @build.gem_rdoc_options.each do |option|
58
+ s.rdoc_options << option
59
+ end unless @build.gem_rdoc_options.nil?
60
+ end
43
61
 
44
62
  @build.gem_runtime_dependencies.each do |gem, version|
45
- s.add_runtime_dependency("#{gem}", "#{version}") unless (version.nil? or version.empty?)
46
- s.add_runtime_dependency("#{gem}") if (version.nil? or version.empty?)
63
+ spec = add_gem_dependency(:spec => spec, :gem => gem, :version => version, :type => :runtime)
47
64
  end unless @build.gem_runtime_dependencies.nil?
48
65
 
49
- @build.gem_devel_dependencies.each do |gem, version|
50
- s.add_devel_dependency("#{gem}", "#{version}") unless (version.nil? or version.empty?)
51
- s.add_devel_dependency("#{gem}") if (version.nil? or version.empty?)
52
- end unless @build.gem_devel_dependencies.nil?
66
+ @build.gem_development_dependencies.each do |gem, version|
67
+ spec = add_gem_dependency(:spec => spec, :gem => gem, :version => version, :type => :development)
68
+ end unless @build.gem_development_dependencies.nil?
69
+ spec
70
+ end
71
+
72
+ def create_gem(spec, gembuilddir)
73
+ gem_task = Gem::PackageTask.new(spec)
74
+ bench = Benchmark.realtime do
75
+ gem_task.define
76
+ Rake::Task[:gem].reenable
77
+ Rake::Task[:gem].invoke
78
+ rm_r File.join("pkg", gembuilddir)
79
+ end
80
+ puts "Finished building in: #{bench}"
81
+ end
53
82
 
54
- @build.gem_rdoc_options.each do |option|
55
- s.rdoc_options << option
56
- end unless @build.gem_rdoc_options.nil?
83
+ def create_default_gem
84
+ spec = create_default_gem_spec
85
+ create_gem(spec, "#{@build.project}-#{@build.gemversion}")
86
+ end
87
+
88
+ def unknown_gems_platform?(platform)
89
+ return true if platform.os == "unknown"
90
+ false
91
+ end
92
+
93
+ def create_platform_specific_gems
94
+ @build.gem_platform_dependencies.each do |platform, dependency_hash|
95
+ spec = create_default_gem_spec
96
+ pf = Gem::Platform.new(platform)
97
+ fail "
98
+ Platform: '#{platform}' is not recognized by rubygems.
99
+ This is probably an erroneous 'gem_platform_dependencies' entry!" if unknown_gems_platform?(pf)
100
+ spec.platform = pf
101
+ dependency_hash.each do |type, gems|
102
+ t = case type
103
+ when "gem_runtime_dependencies"
104
+ "runtime"
105
+ when "gem_development_dependencies"
106
+ "development"
107
+ else
108
+ fail "Platform specific gem dependency type must be 'gem_runtime_dependencies' or 'gem_development_dependencies', not '#{type}'"
109
+ end
110
+ gems.each do |gem, version|
111
+ spec = add_gem_dependency(:spec => spec, :gem => gem, :version => version, :type => t)
112
+ end
113
+ end
114
+ create_gem(spec, "#{@build.project}-#{@build.gemversion}-#{platform}")
115
+ end
57
116
  end
58
117
 
59
118
  namespace :package do
60
- gem_task = Gem::PackageTask.new(spec)
61
- desc "Build a gem"
119
+ desc "Build a gem - All gems if platform specific"
62
120
  task :gem => [ "clean" ] do
63
- bench = Benchmark.realtime do
64
- gem_task.define
65
- Rake::Task[:gem].invoke
66
- rm_rf "pkg/#{@build.project}-#{@build.gemversion}"
67
- end
68
- if @build.benchmark
69
- add_metrics({ :dist => 'gem', :bench => bench })
70
- post_metrics
121
+ create_default_gem
122
+ if @build.gem_platform_dependencies
123
+ create_platform_specific_gems
71
124
  end
72
125
  end
73
126
  end