more and more and more

This commit is contained in:
Jeff Carr 2024-12-17 21:58:14 -06:00
parent 491c4455d8
commit 79ea2eaec1
6 changed files with 14 additions and 50 deletions

View File

@ -87,21 +87,10 @@ curl-incrementAllTargetVersions:
list-release-notdone:
curl --silent http://localhost:9419/releaseList?readonly=true
# only show repos that need to be merged to the master branch
curl-list-changed:
curl --silent http://localhost:9419/list?perfect=false
# include repos that you probably can't git push commits
curl-list-everything:
list-all:
curl --silent http://localhost:9419/list?readonly=true
curl-file-for-go.wit.com:
curl --silent http://localhost:9419/goweblist?readonly=true
curl --silent http://localhost:9419/goweblist?readonly=true |sort > ~/go.wit.com.versions
safe-build: install
forge --find-private
wit-package --no-gui --make-install
cd ~/go/src/go.wit.com/lib/xgb/ && GUIRELEASE_REASON="safe-build" guireleaser

View File

@ -208,7 +208,7 @@ func doRelease() bool {
if !doReleaseFindNext() {
log.Info("doReleaseFindNext() could not find a new", findCounter)
log.Info("THIS PROBABLY MEANS THAT ACTUALLY WE ARE TOTALLY DONE?", findCounter)
count := me.forge.PrintReleaseReport()
count := me.forge.PrintReleaseReport(me.found)
log.Info("count =", count)
os.Setenv("FindNextDone", "true")
return false

37
http.go
View File

@ -28,9 +28,6 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
repoName := r.URL.Query().Get("repo")
version := r.URL.Query().Get("version")
comment := r.URL.Query().Get("comment")
readonly := r.URL.Query().Get("readonly")
onlydirty := r.URL.Query().Get("onlydirty")
perfect := r.URL.Query().Get("perfect")
whitelist := r.URL.Query().Get("whitelist")
switch route {
@ -174,40 +171,10 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
showNext()
return
case "/list":
PrintReport(readonly, onlydirty, perfect)
me.forge.PrintReleaseReport(me.forge.Repos)
return
case "/releaseList":
me.forge.PrintReleaseReport()
return
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 {
log.Info(fmt.Sprintf("tag date error", repo.Name()))
}
// if lastTag == "" {
// lastTag = tag.Name()
// }
if repo.ReadOnly() {
if readonly == "true" {
continue
}
}
// dur := time.Since(gitAge)
// log.Info(fmt.Sprintf("%-60s %s %s %s", repo.Name(), lastTag, shell.FormatDuration(dur), lastTag, tag.Name()))
log.Info(fmt.Sprintf("%s %d %s", repo.Name(), gitAge.Unix(), lastTag))
/*
for _, tag := range repo.Tags.ListAll() {
log.Info(fmt.Sprintf("%-60s %s", "", tag.Name()))
}
*/
}
me.forge.PrintReleaseReport(me.found)
return
default:
log.Info("BAD URL = " + route)

View File

@ -11,6 +11,7 @@ import (
"go.wit.com/gui"
"go.wit.com/lib/gui/shell"
"go.wit.com/lib/protobuf/forgepb"
"go.wit.com/lib/protobuf/gitpb"
"go.wit.com/log"
)
@ -26,6 +27,8 @@ func main() {
// load the ~/.config/forge/ config
me.forge = forgepb.Init()
me.found = new(gitpb.Repos)
// me.forge.ConfigPrintTable()
os.Setenv("REPO_WORK_PATH", me.forge.GetGoSrc())

View File

@ -14,7 +14,7 @@ func makePrepareRelease() {
// if it succeeds, disable this button
me.setBranchesToMasterB.Disable()
me.release.box.Enable()
me.forge.PrintReleaseReport()
me.forge.PrintReleaseReport(me.found)
} else {
log.Info("setAllBranchesToMaster() failed")
}
@ -25,7 +25,8 @@ func makePrepareRelease() {
check := all.Next()
// set the target version to the current master version
check.SetTargetVersion("")
lastTag := check.GetLastTag()
check.SetTargetVersion(lastTag)
}
all = me.forge.Repos.SortByFullPath()
@ -41,12 +42,14 @@ func makePrepareRelease() {
lastTag := check.GetLastTag()
if master != lastTag {
forceReleaseVersion(check)
me.found.AppendUniqueGoPath(check)
continue
}
if argv.Protobuf && check.GetRepoType() == "protobuf" {
// if --protobuf, this will force upgrade each one
forceReleaseVersion(check)
me.found.AppendUniqueGoPath(check)
continue
}
@ -60,6 +63,7 @@ func makePrepareRelease() {
}
log.Printf("dependancy checks indicate a new release is needed for %s\n", check.GetGoPath())
forceReleaseVersion(check)
me.found.AppendUniqueGoPath(check)
}
}

View File

@ -19,6 +19,7 @@ type autoType struct {
reposgrid *gui.Node
reposgroup *gui.Node
current *gitpb.Repo
found *gitpb.Repos // stores the list of repos to process things on
// this is the repo we are starting in
// make sure it never changes so go.mod and go.sum are always there