#8 delete cobra, add micro-config-flag #11

Merged
vtolstov merged 53 commits from kgorbunov/pkgdash:master into master 2024-04-02 22:54:17 +03:00
Showing only changes of commit 61982e469e - Show all commits

View File

@ -238,7 +238,8 @@ func Execute(ctx context.Context, gitSource source.SourceControl, mvs map[string
switch cliCfg.Command { switch cliCfg.Command {
case "checkupdate": case "checkupdate":
logger.Info(ctx, fmt.Sprintf("Modules get update: \n %s", mvs)) js, err := json.Marshal(mvs)
fmt.Println(fmt.Sprintf(`Modules get update: %s, %s`, js, err))
case "update": case "update":
if cliCfg.Path != "" { // update one dep if cliCfg.Path != "" { // update one dep
path = cliCfg.Path path = cliCfg.Path
@ -303,9 +304,13 @@ func Execute(ctx context.Context, gitSource source.SourceControl, mvs map[string
prList[branch] = rMap prList[branch] = rMap
} }
logger.Info(ctx, fmt.Sprintf("for %s:\n%s", cfg.Source.Repository, prList)) js, err := json.Marshal(prList)
if err != nil {
logger.Error(ctx, fmt.Sprintf("error: %s", err))
}
fmt.Println(fmt.Sprintf("for %s:\n%s", cfg.Source.Repository, js))
default: default:
logger.Info(ctx, initMsg) fmt.Print(initMsg)
} }
} }