lib/cicd/builder/manifest/mixlib/build.rb in manifest-builder-0.7.2 vs lib/cicd/builder/manifest/mixlib/build.rb in manifest-builder-0.7.3

- old
+ new

@@ -259,11 +259,11 @@ @logger.warn msg end end end if 0 == @vars[:return_code] - local = getLocalArtifact(artifacts, changed, comp, local_dir, version) + local = getLocalArtifact(artifacts, changed, comp, local_dir, version, build) base = File.basename(local) addArtifact(@vars[:artifacts], local, local_dir, { component: cname, module: cname, name: cname, @@ -347,14 +347,14 @@ true end end # --------------------------------------------------------------------------------------------------------------- - def getLocalArtifact(artifacts, changed, comp, local_dir, version) + def getLocalArtifact(artifacts, changed, comp, local_dir, version, build) cname,cdata = comp if artifacts.size > 1 begin - file = File.join(local_dir, "#{cname}-#{version}.zip") + file = File.join(local_dir, "#{cname}-#{version}-#{build}.zip") if changed or not File.exists?(file) zipped_files = artifacts.map { |f| f.gsub(%r'^#{local_dir}', '') }.join(' ') Dir.chdir(local_dir) do res = %x(zip -o9X #{file} #{zipped_files} 2>&1) @logger.info res