diff options
Diffstat (limited to 'http.go')
| -rw-r--r-- | http.go | 59 |
1 files changed, 57 insertions, 2 deletions
@@ -6,6 +6,7 @@ import ( "os" "strings" + "go.wit.com/lib/gui/repolist" "go.wit.com/log" ) @@ -82,6 +83,8 @@ func okHandler(w http.ResponseWriter, r *http.Request) { msg(w, me.current.StandardHeader()) msg(w, me.current.StandardReleaseHeader()) + case "/rescanAll": + me.repos.View.ScanRepositories() case "/setCurrentRepo": msg(w, "repo: "+repoName) @@ -158,16 +161,39 @@ func okHandler(w http.ResponseWriter, r *http.Request) { if checkValidGoSum(me.current) { msg(w, "checkValidGoSum() == true") } else { - msg(w, "checkValidGoSum() == false") + msg(w, "checkValidGoSum() == false SHOULD NOT RELEASE THIS") } if me.current.Status.IsReleased() { - msg(w, "IsReleased() == true") + msg(w, "IsReleased() == true SHOULD NOT RELEASE THIS") } else { msg(w, "IsReleased() == false") } + if me.current.Status.CheckDirty() { + msg(w, "CheckDirty() == true. SHOULD NOT RELEASE THIS") + } else { + msg(w, "CheckDirty() == false") + } + if me.current.Status.IsPrimitive() { + msg(w, "IsPrimitive() == true") + } else { + msg(w, "IsPrimitive() == false") + } + if me.current.Status.IsProtobuf() { + msg(w, "IsProtobuf() == true") + } else { + msg(w, "IsProtobuf() == false") + } + if me.current.Status.Whitelist { + msg(w, "Whitelist == true SHOULD NOT RELEASE THIS") + } else { + msg(w, "Whitelist == false") + } msg(w, "") + msg(w, repolist.ReportHeader()) msg(w, me.current.StandardHeader()) + msg(w, "") + msg(w, repolist.ReleaseReportHeader()) msg(w, me.current.StandardReleaseHeader()) case "/list": me.repos.View.PrintReport(w, readonly, onlydirty, perfect) @@ -176,6 +202,35 @@ func okHandler(w http.ResponseWriter, r *http.Request) { case "/quit": msg(w, "Got URL /quit") os.Exit(0) + case "/goweblist": + loop := me.repos.View.ReposAll() + for loop.Scan() { + repo := loop.Repo() + + lastTag := repo.LastTag() + tag := repo.Status.NewestTag() + gitAge, err := tag.GetDate() + if err != nil { + msg(w, fmt.Sprintf("tag date error", repo.Name())) + } + // if lastTag == "" { + // lastTag = tag.Name() + // } + if repo.ReadOnly() { + if readonly == "true" { + continue + } + } + // dur := time.Since(gitAge) + // msg(w, fmt.Sprintf("%-60s %s %s %s", repo.Name(), lastTag, shell.FormatDuration(dur), lastTag, tag.Name())) + msg(w, fmt.Sprintf("%s %d %s", repo.Name(), gitAge.Unix(), lastTag)) + /* + for _, tag := range repo.Tags.ListAll() { + msg(w, fmt.Sprintf("%-60s %s", "", tag.Name())) + } + */ + + } default: msg(w, "BAD URL = "+route) } |
