Sha256: 2c1ae5f02f649f7ee76228a5e1ebfcac8a345bf108aae1f295127fc3a55819ff

Contents?: true

Size: 1.47 KB

Versions: 21

Compression:

Stored size: 1.47 KB

Contents

require 'fileutils'

GEM_FILES = FileList[
    '[A-Z]*',
    'install.rb',
    'bin/**/*',
    'lib/**/*',
    'conf/**/*',
    'man/**/*',
    'examples/**/*',
    'ext/**/*',
    'tasks/**/*',
    'test/**/*',
    'spec/**/*'
]

EXECUTABLES = FileList[
    'bin/**/*',
    'sbin/**/*'
]

SBIN = Dir.glob("sbin/*")

spec = Gem::Specification.new do |spec|
    spec.platform = Gem::Platform::RUBY
    spec.name = 'puppet'
    spec.files = GEM_FILES.to_a
    spec.executables = EXECUTABLES.gsub(/sbin\/|bin\//, '').to_a
    spec.version = Puppet::PUPPETVERSION
    spec.add_dependency('facter', '>= 1.5.1')
    spec.summary = 'Puppet, an automated configuration management tool'
    spec.description = 'Puppet, an automated configuration management tool'
    spec.author = 'Puppet Labs'
    spec.email = 'puppet@puppetlabs.com'
    spec.homepage = 'http://puppetlabs.com'
    spec.rubyforge_project = 'puppet'
    spec.has_rdoc = true
    spec.rdoc_options <<
        '--title' <<  'Puppet - Configuration Management' <<
        '--main' << 'README' <<
        '--line-numbers'
end

desc "Prepare binaries for gem creation"
task :prepare_gem do
    SBIN.each do |f|
      FileUtils.copy(f,"bin")
    end
end

desc "Create the gem"
task :create_gem => :prepare_gem do
    Dir.mkdir("pkg") rescue nil
    Gem::Builder.new(spec).build
    FileUtils.move("puppet-#{Puppet::PUPPETVERSION}.gem", "pkg")
    SBIN.each do |f|
       fn = f.gsub(/sbin\/(.*)/, '\1')
       FileUtils.rm_r "bin/" + fn
    end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
supply_drop-0.11.0 examples/vendored-puppet/vendor/puppet-2.7.8/tasks/rake/gem.rake
supply_drop-0.10.2 examples/vendored-puppet/vendor/puppet-2.7.8/tasks/rake/gem.rake
supply_drop-0.10.1 examples/vendored-puppet/vendor/puppet-2.7.8/tasks/rake/gem.rake
supply_drop-0.10.0 examples/vendored-puppet/vendor/puppet-2.7.8/tasks/rake/gem.rake
puppet-2.7.14 tasks/rake/gem.rake
puppet-2.7.13 tasks/rake/gem.rake
supply_drop-0.9.0 examples/vendored-puppet/vendor/puppet-2.7.8/tasks/rake/gem.rake
supply_drop-0.8.1 examples/vendored-puppet/vendor/puppet-2.7.8/tasks/rake/gem.rake
supply_drop-0.8.0 examples/vendored-puppet/vendor/puppet-2.7.8/tasks/rake/gem.rake
puppet-2.7.12 tasks/rake/gem.rake
puppet-2.7.11 tasks/rake/gem.rake
supply_drop-0.7.0 examples/vendored-puppet/vendor/puppet-2.7.8/tasks/rake/gem.rake
supply_drop-0.6.1 examples/vendored-puppet/vendor/puppet-2.7.8/tasks/rake/gem.rake
supply_drop-0.6.0 examples/vendored-puppet/vendor/puppet-2.7.8/tasks/rake/gem.rake
puppet-2.7.9 tasks/rake/gem.rake
puppet-2.7.8 tasks/rake/gem.rake
puppet-2.7.6 tasks/rake/gem.rake
puppet-2.7.5 tasks/rake/gem.rake
puppet-2.7.4 tasks/rake/gem.rake
puppet-2.7.3 tasks/rake/gem.rake