Class: Puppet::Module::Tool::Applications::Builder
- Inherits:
-
Application
- Object
- Application
- Puppet::Module::Tool::Applications::Builder
- Defined in:
- lib/puppet/module/tool/applications/builder.rb
Instance Attribute Summary
Attributes inherited from Application
Instance Method Summary collapse
-
#initialize(path, options) ⇒ Builder
constructor
A new instance of Builder.
- #run ⇒ Object
Methods inherited from Application
#discuss, #load_modulefile!, #metadata, #parse_filename!, #repository, run
Methods included from Utils::Interrogation
#confirms?, #header, #prompt, #say, #subheader
Constructor Details
#initialize(path, options) ⇒ Builder
Returns a new instance of Builder.
9 10 11 12 13 |
# File 'lib/puppet/module/tool/applications/builder.rb', line 9 def initialize(path, ) @path = File.(path) @pkg_path = File.join(@path, 'pkg') super() end |
Instance Method Details
#run ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/puppet/module/tool/applications/builder.rb', line 15 def run load_modulefile! create_directory copy_contents header "Building #{@path} for release" tar gzip relative = Pathname.new(File.join(@pkg_path, filename('tar.gz'))).relative_path_from(Pathname.new(Dir.pwd)) # TODO Implement "release" feature. ### say "Done. Now you probably want to:\n $ puppet-module release #{relative}" say "Done. Built: #{relative}" end |