Remove gem.rake from 3.0.x
gem.rake is no longer used in 3.0.x because of the new workflow using the packaging repo. It was still required in 2.7.x because 2.7.x still shipped with sbin files and the gem.rake did some magic with moving sbin to bin. This commit removes the rake task.
This commit is contained in:
Родитель
09e353e2f7
Коммит
03e2e0ec34
|
@ -1,62 +0,0 @@
|
|||
require 'fileutils'
|
||||
require 'puppet/version'
|
||||
|
||||
GEM_FILES = FileList[
|
||||
'[A-Z]*',
|
||||
'install.rb',
|
||||
'bin/**/*',
|
||||
'lib/**/*',
|
||||
'conf/**/*',
|
||||
'man/**/*',
|
||||
'examples/**/*',
|
||||
'ext/**/*',
|
||||
'tasks/**/*',
|
||||
'test/**/*',
|
||||
'spec/**/*'
|
||||
]
|
||||
|
||||
EXECUTABLES = FileList[
|
||||
'bin/**/*',
|
||||
'sbin/**/*'
|
||||
]
|
||||
|
||||
SBIN = Dir.glob("sbin/*")
|
||||
GEMVERSION = Puppet.version.gsub('-','.')
|
||||
|
||||
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 = GEMVERSION
|
||||
spec.add_dependency('facter', '~> 1.5')
|
||||
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-#{GEMVERSION}.gem", "pkg")
|
||||
SBIN.each do |f|
|
||||
fn = f.gsub(/sbin\/(.*)/, '\1')
|
||||
FileUtils.rm_r "bin/" + fn
|
||||
end
|
||||
end
|
Загрузка…
Ссылка в новой задаче