1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

fix: multiple files with same name warning (#3660)

the warning was too trigger happy, this should fix it.

thanks @ioga for reporting it.

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker 2022-12-23 11:17:11 -03:00 committed by GitHub
parent 89856068b8
commit 46fdb5552a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -294,11 +294,12 @@ func (artifacts Artifacts) List() []*Artifact {
if item.Name == "" {
continue
}
if names[item.Name] {
plat := item.Goos + item.Goarch + item.Goarm + item.Gomips + item.Goamd64
if names[item.Name+"_"+plat] {
log.WithField("name", item.Name).
Warn("multiple artifacts with the same name: this may cause errors")
}
names[item.Name] = true
names[item.Name+"_"+plat] = true
}
return artifacts.items
}