smarter IsReadOnly() logic
This commit is contained in:
parent
135f1e5f42
commit
0fa1ea471f
|
@ -107,7 +107,7 @@ func goodGodeps(repo *repolist.RepoRow) bool {
|
|||
for deps.Scan() {
|
||||
depRepo := deps.Next()
|
||||
// log.Info("found dep", depRepo.GetGoPath())
|
||||
if me.forge.IsReadOnly(depRepo.GetGoPath()) {
|
||||
if me.forge.Config.IsReadOnly(depRepo.GoPath) {
|
||||
// log.Info("IsReadOnly = true", depRepo.GetGoPath())
|
||||
continue
|
||||
} else {
|
||||
|
@ -156,7 +156,7 @@ func fixGodeps(check *gitpb.Repo) bool {
|
|||
for deps.Scan() {
|
||||
depRepo := deps.Next()
|
||||
// log.Info("found dep", depRepo.GetGoPath())
|
||||
if me.forge.IsReadOnly(depRepo.GetGoPath()) {
|
||||
if me.forge.Config.IsReadOnly(depRepo.GoPath) {
|
||||
log.Info("IsReadOnly = true", depRepo.GetGoPath())
|
||||
continue
|
||||
} else {
|
||||
|
|
21
human.go
21
human.go
|
@ -25,7 +25,7 @@ func PrintReport(readonly string, onlydirty string, perfect string) {
|
|||
continue
|
||||
}
|
||||
|
||||
if repo.ReadOnly() {
|
||||
if me.forge.Config.IsReadOnly(repo.GoPath()) {
|
||||
if readonly == "true" {
|
||||
log.Info(header + "readonly")
|
||||
}
|
||||
|
@ -60,28 +60,21 @@ func PrintReleaseReport(readonly string, perfect string) {
|
|||
|
||||
log.Info(repolist.ReleaseReportHeader())
|
||||
|
||||
loop := me.repos.View.ReposSortByName()
|
||||
loop := me.forge.Repos.SortByGoPath()
|
||||
for loop.Scan() {
|
||||
repo := loop.Repo()
|
||||
|
||||
if repo.ReadOnly() && (readonly == "true") {
|
||||
check := loop.Next()
|
||||
if me.forge.IsReadOnly(check) {
|
||||
continue
|
||||
}
|
||||
if (repo.State() == "PERFECT") && (perfect == "true") {
|
||||
continue
|
||||
}
|
||||
if repo.Status.IsReleased() {
|
||||
if check.GetCurrentBranchVersion() == check.GetTargetVersion() {
|
||||
continue
|
||||
}
|
||||
count += 1
|
||||
header := repo.StandardReleaseHeader()
|
||||
log.Info(header)
|
||||
check := me.forge.Repos.FindByGoPath(repo.GoPath())
|
||||
if check == nil {
|
||||
log.Info("boo, you didn't git clone", repo.GoPath())
|
||||
log.Info("boo, you didn't git clone", check.GoPath)
|
||||
continue
|
||||
}
|
||||
log.Info(me.forge.StandardReleaseHeader(check, repo.State()))
|
||||
log.Info(me.forge.StandardReleaseHeader(check, ""))
|
||||
}
|
||||
log.Info(fmt.Sprintf("total repo count = %d", count))
|
||||
}
|
||||
|
|
2
main.go
2
main.go
|
@ -110,7 +110,7 @@ func main() {
|
|||
loop := me.repos.View.ReposSortByName()
|
||||
for loop.Scan() {
|
||||
repo := loop.Repo()
|
||||
if me.forge.IsReadOnly(repo.GoPath()) {
|
||||
if me.forge.Config.IsReadOnly(repo.GoPath()) {
|
||||
repo.Status.SetReadOnly(true)
|
||||
} else {
|
||||
repo.Status.SetReadOnly(false)
|
||||
|
|
|
@ -91,7 +91,6 @@ func makePrepareRelease() {
|
|||
repo.Status.IncrementRevisionVersion("godeps changed")
|
||||
target := repo.Status.GetTargetVersion()
|
||||
check.SetTargetVersion(target)
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue