Method: PDK::Module::Build#ignore_file

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

#ignore_fileString

Select the most appropriate ignore file in the module directory.

In order of preference, we first try ‘.pdkignore`, then `.pmtignore` and finally `.gitignore`.

Returns:

  • (String)

    The path to the file containing the patterns of file paths to ignore.



287
288
289
290
291
292
293
# File 'lib/pdk/module/build.rb', line 287

def ignore_file
  @ignore_file ||= [
    File.join(module_dir, '.pdkignore'),
    File.join(module_dir, '.pmtignore'),
    File.join(module_dir, '.gitignore'),
  ].find { |file| PDK::Util::Filesystem.file?(file) && PDK::Util::Filesystem.readable?(file) }
end