# File lib/mcollective/pluginpackager/modulepackage_packager.rb, line 6 def initialize(plugin, pluginpath = nil, signature = nil, verbose = false, keep_artifacts = nil, module_template = nil) assert_new_enough_puppet @plugin = plugin @package_name = "#{@plugin.mcname}_#{@plugin.metadata[:name]}".gsub(/-/, '_') @verbose = verbose @keep_artifacts = keep_artifacts @module_template = module_template || File.join(File.dirname(__FILE__), 'templates', 'module') end
Build Process :
create module directory
run 'puppet module build'
move generated package back to cwd
# File lib/mcollective/pluginpackager/modulepackage_packager.rb, line 19 def create_packages begin puts "Building module for #{@package_name} plugin." @tmpdir = Dir.mktmpdir('mcollective_packager') make_module run_build move_package puts "Completed building module for #{@package_name} plugin." ensure if @keep_artifacts puts 'Keeping build artifacts' puts "Build artifacts saved - #{@tmpdir}" else cleanup_tmpdirs end end end