Propagate also original Artifact name inside the copyjob

This commit is contained in:
Ettore Di Giacinto 2019-11-13 17:06:55 +01:00
parent d752c0572b
commit d5a8579454
No known key found for this signature in database
GPG Key ID: 965A712536341999

View File

@ -47,6 +47,7 @@ func (a *PackageArtifact) SetPath(p string) {
type CopyJob struct {
Src, Dst string
Artifact string
}
func worker(i int, wg *sync.WaitGroup, s <-chan CopyJob) {
@ -103,7 +104,7 @@ func ExtractArtifactFromDelta(src, dst string, layers []ArtifactLayer, concurren
for _, l := range layers {
// Consider d.Additions (and d.Changes? - warn at least) only
for _, a := range l.Diffs.Additions {
toCopy <- CopyJob{Src: filepath.Join(src, a.Name), Dst: filepath.Join(archive, a.Name)}
toCopy <- CopyJob{Src: filepath.Join(src, a.Name), Dst: filepath.Join(archive, a.Name), Artifact: a.Name}
}
}
close(toCopy)