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

fix(nfpm): wrong filename for arm64

refs #5186
closes #5238
This commit is contained in:
Carlos Alexandro Becker 2024-11-02 13:50:41 -03:00
parent 3cf2556a26
commit f65c757073
No known key found for this signature in database
2 changed files with 15 additions and 3 deletions

View File

@ -179,9 +179,9 @@ var termuxArchReplacer = strings.NewReplacer(
)
func create(ctx *context.Context, fpm config.NFPM, format string, artifacts []*artifact.Artifact) error {
// TODO: improve mips handling on nfpm
infoArch := artifacts[0].Goarch + artifacts[0].Go386 + artifacts[0].Goarm + artifacts[0].Goarm64 + artifacts[0].Gomips + artifacts[0].Goppc64 + artifacts[0].Goriscv64 // key used for the ConventionalFileName et al
arch := infoArch + artifacts[0].Goamd64 // unique arch key
// TODO: improve this.
infoArch := artifacts[0].Goarch + artifacts[0].Go386 + artifacts[0].Goarm + artifacts[0].Gomips // key used for the ConventionalFileName et al
arch := infoArch + artifacts[0].Goamd64 + artifacts[0].Goarm64 + artifacts[0].Goppc64 + artifacts[0].Goriscv64 // unique arch key
infoPlatform := artifacts[0].Goos
if infoPlatform == "ios" {
if format == "deb" {

View File

@ -538,6 +538,18 @@ func doTestRunPipeConventionalNameTemplate(t *testing.T, snapshot bool) {
}
switch goarch {
case "arm64":
ctx.Artifacts.Add(&artifact.Artifact{
Name: "subdir/mybin",
Path: binPath,
Goarch: goarch,
Goos: goos,
Goarm64: "v8.0",
Type: artifact.Binary,
Extra: map[string]interface{}{
artifact.ExtraID: "default",
},
})
case "arm":
for _, goarm := range []string{"6", "7"} {
ctx.Artifacts.Add(&artifact.Artifact{