1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-06 03:13:48 +02:00

fix: winget paths on windows (#4786)

closes  #4785
This commit is contained in:
Carlos Alexandro Becker 2024-04-16 20:57:22 -03:00 committed by GitHub
parent 5d37c9a5a0
commit 1ed1a62b90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -3,6 +3,7 @@ package winget
import (
"fmt"
"os"
"path"
"path/filepath"
"strings"
@ -20,7 +21,7 @@ func createYAML(ctx *context.Context, winget config.Winget, in any, tp artifact.
}
filename := winget.PackageIdentifier + extFor(tp)
path := filepath.Join(ctx.Config.Dist, "winget", winget.Path, filename)
path := path.Join(ctx.Config.Dist, "winget", winget.Path, filename)
if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {
return err
}

View File

@ -3,6 +3,7 @@ package winget
import (
"fmt"
"os"
"path"
"path/filepath"
"regexp"
"strings"
@ -161,7 +162,7 @@ func (p Pipe) doRun(ctx *context.Context, winget config.Winget, cl client.Releas
}
if winget.Path == "" {
winget.Path = filepath.Join("manifests", strings.ToLower(string(winget.Publisher[0])), winget.Publisher, winget.Name, ctx.Version)
winget.Path = path.Join("manifests", strings.ToLower(string(winget.Publisher[0])), winget.Publisher, winget.Name, ctx.Version)
}
filters := []artifact.Filter{
@ -300,7 +301,7 @@ func doPublish(ctx *context.Context, cl client.Client, wingets []*artifact.Artif
}
files = append(files, client.RepoFile{
Content: content,
Path: filepath.Join(winget.Path, pkg.Name),
Path: path.Join(winget.Path, pkg.Name),
Identifier: repoFileID(pkg.Type),
})
}