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

feat(aur): single commit per package (#4126)

using the new multiple files api to have a single commit/push for all
files of a package.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker 2023-06-19 14:03:22 -03:00 committed by GitHub
parent db6a1704ed
commit 42822497ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -381,15 +381,16 @@ func doPublish(ctx *context.Context, pkgs []*artifact.Artifact) error {
Name: cfg.Name, Name: cfg.Name,
}) })
files := make([]client.RepoFile, 0, len(pkgs))
for _, pkg := range pkgs { for _, pkg := range pkgs {
content, err := os.ReadFile(pkg.Path) content, err := os.ReadFile(pkg.Path)
if err != nil { if err != nil {
return err return err
} }
if err := cli.CreateFile(ctx, author, repo, content, pkg.Name, msg); err != nil { files = append(files, client.RepoFile{
return err Path: pkg.Name,
} Content: content,
})
} }
return cli.CreateFiles(ctx, author, repo, msg, files)
return nil
} }