Method: PDK::Module::Release#run_documentation

Defined in:
lib/pdk/module/release.rb

#run_documentation(_opts) ⇒ Object



118
119
120
121
122
123
124
# File 'lib/pdk/module/release.rb', line 118

def run_documentation(_opts)
  PDK.logger.info 'Updating documentation using puppet strings'
  docs_command = PDK::CLI::Exec::InteractiveCommand.new(PDK::CLI::Exec.bundle_bin, 'exec', 'puppet', 'strings', 'generate', '--format', 'markdown', '--out', 'REFERENCE.md')
  docs_command.context = :module
  result = docs_command.execute!
  raise PDK::CLI::ExitWithError, format('An error occured generating the module documentation: %{stdout}', stdout: result[:stdout]) unless result[:exit_code].zero?
end