diff --git a/apk/apk.go b/apk/apk.go index a7c9c816..702d8f49 100644 --- a/apk/apk.go +++ b/apk/apk.go @@ -90,11 +90,11 @@ func (a *Apk) ConventionalFileName(info *nfpm.Info) string { version := info.Version if info.Prerelease != "" { - version += "" + info.Prerelease + version += "_" + info.Prerelease } if info.Release != "" { - version += "-" + info.Release + version += "_p" + info.Release } return fmt.Sprintf("%s_%s_%s.apk", info.Name, version, info.Arch) diff --git a/apk/apk_test.go b/apk/apk_test.go index f94bbe20..bdfd23d3 100644 --- a/apk/apk_test.go +++ b/apk/apk_test.go @@ -478,19 +478,19 @@ func TestAPKConventionalFileName(t *testing.T) { }, { Arch: "386", Version: "1.2.3", Prerelease: "git", - Expect: "default_1.2.3git_x86.apk", + Expect: "default_1.2.3_git_x86.apk", }, { Arch: "386", Version: "1.2.3", Prerelease: "git", Release: "1", - Expect: "default_1.2.3git-1_x86.apk", + Expect: "default_1.2.3_git_p1_x86.apk", }, { Arch: "all", Version: "1.2.3", Expect: "default_1.2.3_all.apk", }, { - Arch: "386", Version: "1.2.3", Release: "1", Prerelease: "beta", - Expect: "default_1.2.3beta-1_x86.apk", + Arch: "386", Version: "1.2.3", Release: "1", Prerelease: "beta1", + Expect: "default_1.2.3_beta1_p1_x86.apk", }, }