diff options
| author | Jeff Carr <[email protected]> | 2024-12-17 13:13:34 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-17 13:13:34 -0600 |
| commit | 23b2b26643596aa1aeba229067b14a97d297f8bf (patch) | |
| tree | c9d2f8a24ccb857e968b56b8e7dac0698f5dedfc /human.go | |
| parent | 7db8376213128cc05eacc9fe4434c006bbc7d326 (diff) | |
formatting for releases
Diffstat (limited to 'human.go')
| -rw-r--r-- | human.go | 37 |
1 files changed, 33 insertions, 4 deletions
@@ -51,20 +51,20 @@ func (f *Forge) ConfigPrintTable() { // show information while doing golang releases func (f *Forge) StandardReleaseHeader(repo *gitpb.Repo, state string) string { - lastTag := repo.GetLastTag() // tag := repo.NewestTag() // gitAge, _ := tag.GetDate() dur := repo.NewestAge() curname := repo.GetCurrentBranchName() + + lastTag := repo.GetLastTag() + target := repo.GetTargetVersion() master := repo.GetMasterVersion() user := repo.GetUserVersion() - target := repo.GetTargetVersion() header := fmt.Sprintf("%-35s %5s %-10s %-10s %-10s %-20s %-20s %-15s", repo.GetGoPath(), shell.FormatDuration(dur), curname, - lastTag, target, - master, user, + lastTag, target, master, user, state) return header } @@ -76,3 +76,32 @@ func ReleaseReportHeader() string { "MASTER", "USER", "STATE") } + +func (f *Forge) PrintReleaseReport() int { + var count int + + log.Info(ReleaseReportHeader()) + + loop := f.Repos.SortByFullPath() + for loop.Scan() { + check := loop.Next() + if f.Config.IsReadOnly(check.GetGoPath()) { + continue + } + if check.GetLastTag() == check.GetTargetVersion() { + continue + } + count += 1 + if check == nil { + log.Info("boo, you didn't git clone", check.GetGoPath()) + continue + } + var state string + if check.CheckDirty() { + state = "(dirty)" + } + log.Info(f.StandardReleaseHeader(check, state)) + } + log.Info(fmt.Sprintf("total repo count = %d", count)) + return count +} |
