summaryrefslogtreecommitdiffstats
path: root/tasks/rake
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2010-01-06 18:18:46 +1100
committerJames Turnbull <james@lovedthanlost.net>2010-01-06 18:18:46 +1100
commitdd22b71161b0ab943bc3f6edbf6f104e1c882a14 (patch)
tree2dd003865a4bd8f95265f715febed7454b4feb9e /tasks/rake
parentd0efcc6175beed99e719ed0a56286da4693a71f2 (diff)
downloadpuppet-dd22b71161b0ab943bc3f6edbf6f104e1c882a14.tar.gz
puppet-dd22b71161b0ab943bc3f6edbf6f104e1c882a14.tar.xz
puppet-dd22b71161b0ab943bc3f6edbf6f104e1c882a14.zip
Replaced ugly gem creation task with slightly less ugly task
Diffstat (limited to 'tasks/rake')
-rw-r--r--tasks/rake/gem.rake25
1 files changed, 19 insertions, 6 deletions
diff --git a/tasks/rake/gem.rake b/tasks/rake/gem.rake
index 7ef4472c1..e37395231 100644
--- a/tasks/rake/gem.rake
+++ b/tasks/rake/gem.rake
@@ -1,3 +1,5 @@
+require 'ftools'
+
GEM_FILES = FileList[
'[A-Z]*',
'install.rb',
@@ -12,14 +14,22 @@ GEM_FILES = FileList[
'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 = %w{puppetca puppetd puppetmasterd puppetqd puppetrun filebucket pi puppet puppetdoc ralsh}
+ 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 = 'Reductive Labs'
spec.email = 'puppet@reductivelabs.com'
spec.homepage = 'http://reductivelabs.com'
@@ -33,14 +43,17 @@ end
desc "Prepare binaries for gem creation"
task :prepare_gem do
- sh "mv sbin/* bin"
+ SBIN.each do |f|
+ File.copy(f,"bin")
+ end
end
desc "Create the gem"
task :create_gem => :prepare_gem do
- sh "mkdir -p pkg"
+ Dir.mkdir("pkg") rescue nil
Gem::Builder.new(spec).build
- sh "mv *.gem pkg"
- sh "rm bin/*"
- sh "git reset --hard"
+ File.move("puppet-#{Puppet::PUPPETVERSION}.gem", "pkg")
+ SBIN.each do |f|
+ File.unlink("bin/" + f.gsub(/sbin\//, ''))
+ end
end