blob: 16211540022833883553717feec7869ec3cbaad3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
package main
import (
"fmt"
"go.wit.com/lib/gui/repolist"
"go.wit.com/log"
)
func PrintReport(readonly string, onlydirty string, perfect string) {
var count int
log.Info(repolist.ReportHeader())
loop := me.repos.View.ReposSortByName()
for loop.Scan() {
repo := loop.Repo()
count += 1
header := repo.StandardHeader()
if onlydirty == "true" {
if repo.CheckDirty() {
log.Info(header + "")
}
continue
}
if me.forge.Config.IsReadOnly(repo.GetGoPath()) {
if readonly == "true" {
log.Info(header + "readonly")
}
continue
}
if repo.State() == "PERFECT" {
if perfect == "false" {
continue
}
}
if repo.State() != "merge to main" {
log.Info(header + "")
continue
}
if repo.CheckDirty() {
log.Info(header + "")
continue
}
log.Info(header + "")
check := me.forge.FindByGoPath(repo.GetGoPath())
if check == nil {
log.Info("boo, you didn't git clone", repo.GetGoPath())
continue
}
me.forge.StandardReleaseHeader(check, repo.State())
}
log.Info(fmt.Sprintf("EVERYTHING WORKED repo count = %d", count))
}
func PrintReleaseReport(readonly string, perfect string) int {
var count int
log.Info(repolist.ReleaseReportHeader())
loop := me.forge.Repos.SortByFullPath()
for loop.Scan() {
check := loop.Next()
if me.forge.Config.IsReadOnly(check.GetGoPath()) {
continue
}
if check.GetCurrentBranchVersion() == 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(me.forge.StandardReleaseHeader(check, state))
}
log.Info(fmt.Sprintf("total repo count = %d", count))
return count
}
|