lib/cicd/builder/manifest/mixlib/repo/artifactory.rb in manifest-builder-0.5.2 vs lib/cicd/builder/manifest/mixlib/repo/artifactory.rb in manifest-builder-0.5.4

- old
+ new

@@ -46,16 +46,16 @@ projects = {} project_names = {} unless ENV['PROJECT_NAMES'].nil? if File.exists?(ENV['PROJECT_NAMES']) @logger.info "Load PROJECT_NAMES: #{ENV['PROJECT_NAMES']}" - project_names = JSON.load(IO.read(ENV['PROJECT_NAMES'])) + project_names = JSON.load(IO.read(ENV['PROJECT_NAMES'])) || {} else @logger.error "The PROJECT_NAMES file (#{ENV['PROJECT_NAMES']}) does not exist!" @vars[:return_code] = Errors::NO_PROJECT_NAMES end end - exts = Hash[@vars[:artifacts].map { |a| [a[:data][:name], File.extname(File.basename(a[:data][:file])).gsub(%r'^\.', '')] }] + exts = Hash[@vars[:artifacts].map { |a| [a[:data][:name], File.basename(a[:data][:file]).match(CiCd::Builder::Manifest::Build::EXT_RGX)[1]] }] @manifest.each do |mod, man| man.each do |prod, build| projects[prod] = { name: project_names[prod] || prod, module: mod,