button to quickly prep everything

This commit is contained in:
Jeff Carr 2025-01-18 07:47:34 -06:00
parent dcc51eb776
commit 973bcfd4eb
4 changed files with 27 additions and 6 deletions

View File

@ -96,3 +96,11 @@ func doAllCheckoutUser() bool {
}
return true
}
func doCheckoutMaster() {
me.forge.CheckoutMaster()
me.forge = forgepb.Init()
me.found = new(gitpb.Repos)
argv.Checkout.Master.findRepos()
me.forge.PrintHumanTable(me.found)
}

View File

@ -101,7 +101,7 @@ func examineBranch(repo *gitpb.Repo) error {
if repo.CurrentTag.Refname == repo.GetMasterBranchName() {
err = fmt.Errorf("examineBranch() SPECIAL CASE. %s is the master branch", repo.CurrentTag.Refname)
log.Info(err)
return err
return nil
}
err = fmt.Errorf("examineBranch() branch differs. patch diff len == 0. PROBABLY DELETE BRANCH %s", repo.CurrentTag.Refname)

View File

@ -111,11 +111,7 @@ func main() {
}
if argv.Checkout.Master != nil {
me.forge.CheckoutMaster()
me.forge = forgepb.Init()
me.found = new(gitpb.Repos)
argv.Checkout.Master.findRepos()
me.forge.PrintHumanTable(me.found)
doCheckoutMaster()
}
log.Info("make 'user' the default here?")
okExit("")

View File

@ -161,6 +161,23 @@ func (r *repoWindow) repoMenu() *gui.Node {
}
me.forge.PrintHumanTable(me.found)
})
box2.NewButton("Prep for release()", func() {
r.Disable()
defer r.Enable()
if IsAnythingDirty() {
log.Info("You can't apply patches when repos are dirty")
me.forge.PrintHumanTable(me.found)
return
}
if !r.mergeAllUserToDevel() {
return
}
if !r.mergeAllDevelToMain() {
return
}
doCheckoutMaster()
})
return box2
}