#8 change Update.

This commit is contained in:
Gorbunov Kirill Andreevich
2024-03-21 15:29:36 +03:00
parent b83cbd9c8e
commit 4ba405adbc
2 changed files with 11 additions and 7 deletions

View File

@@ -157,7 +157,7 @@ func main() {
OnUpdate: func(u modules.Update) {
var modpath string // new mod path with major
if u.Err != nil {
logger.Error(ctx, "%s: failed: %v", u.Module.Path, u.Err)
logger.Error(ctx, fmt.Sprintf("%s: failed: %v", u.Module.Path, u.Err))
return
}
modpath = u.Module.Path
@@ -215,7 +215,7 @@ func main() {
gitSource := source.NewSourceControl(*cfg)
for _, branch := range cfg.Branches {
for pathMod, mod := range mvs {
logger.Debugf(ctx, "Start update %s from %s to %s", pathMod, mod.Module.Version, mod.Version)
logger.Debugf(ctx, fmt.Sprintf("Start update %s from %s to %s", pathMod, mod.Module.Version, mod.Version))
err = gitSource.RequestOpen(ctx, branch, pathMod, mod)
if err != nil {
if err.Error() == "pull request exists" {
@@ -226,7 +226,7 @@ func main() {
}
logger.Error(ctx, fmt.Sprintf("failed to create pr: %v", err))
}
logger.Debugf(ctx, "Update successful for %s", pathMod)
logger.Debugf(ctx, fmt.Sprintf("Update successful for %s", pathMod))
}
}
//err = gitSource.RequestClose(ctx, "master", "modernc.org/ccgo/v4")