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:
parent
db6a1704ed
commit
42822497ae
@ -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
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user