add a do-it all button for merging
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
4c2739186c
commit
7071aad1a5
|
@ -100,5 +100,5 @@ func attemptAutoRebuild() {
|
|||
quickCmd(fullpath, []string{"go", "build", "-v", "-x", "-buildmode=plugin", "-o", libfile})
|
||||
|
||||
fullpath = filepath.Join(homeDir, "go/src/go.wit.com")
|
||||
quickCmd(fullpath, []string{"go", "install", "-v", "go.wit.com/apps/autotypist@"+version})
|
||||
quickCmd(fullpath, []string{"go", "install", "-v", "go.wit.com/apps/autotypist@" + version})
|
||||
}
|
||||
|
|
107
repolist.go
107
repolist.go
|
@ -201,6 +201,70 @@ func repoAllButtons(box *gui.Node) {
|
|||
|
||||
grid1.NewButton("merge all user to devel", func() {
|
||||
reposwin.Disable()
|
||||
if ! mergeAllUserToDevel() {
|
||||
return
|
||||
}
|
||||
reposwin.Enable()
|
||||
})
|
||||
|
||||
grid1.NewButton("merge all devel to main", func() {
|
||||
reposwin.Disable()
|
||||
if ! mergeAllDevelToMain() {
|
||||
return
|
||||
}
|
||||
reposwin.Enable()
|
||||
})
|
||||
|
||||
grid1.NewButton("merge it all", func() {
|
||||
reposwin.Disable()
|
||||
if ! mergeAllUserToDevel() {
|
||||
return
|
||||
}
|
||||
if ! mergeAllDevelToMain() {
|
||||
return
|
||||
}
|
||||
reposwin.Enable()
|
||||
})
|
||||
|
||||
grid1.NewButton("status.Update() all", func() {
|
||||
for _, repo := range me.allrepos {
|
||||
repo.status.Update()
|
||||
repo.newScan()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func mergeAllDevelToMain() bool {
|
||||
log.Info("merge all here")
|
||||
for _, repo := range me.allrepos {
|
||||
if repo.status.ReadOnly() {
|
||||
log.Info("skipping readonly", repo.String(), repo.dirtyLabel.String())
|
||||
continue
|
||||
}
|
||||
if repo.dirtyLabel.String() != "merge to main" {
|
||||
log.Info("skipping. not merge to main", repo.String(), repo.dirtyLabel.String())
|
||||
continue
|
||||
}
|
||||
if repo.status.CheckDirty() {
|
||||
log.Info("skipping dirty", repo.String(), repo.dirtyLabel.String())
|
||||
continue
|
||||
}
|
||||
log.Info("found", repo.String(), repo.dirtyLabel.String())
|
||||
// repo.status.Update()
|
||||
if repo.status.RunDevelMergeB() {
|
||||
log.Warn("THINGS SEEM OK fullAutomation() returned true.")
|
||||
} else {
|
||||
log.Warn("THINGS FAILED fullAutomation() returned false")
|
||||
return false
|
||||
}
|
||||
repo.status.Update()
|
||||
repo.newScan()
|
||||
}
|
||||
log.Warn("EVERYTHING WORKED")
|
||||
return true
|
||||
}
|
||||
|
||||
func mergeAllUserToDevel() bool {
|
||||
log.Info("merge all here")
|
||||
for _, repo := range me.allrepos {
|
||||
if repo.status.ReadOnly() {
|
||||
|
@ -221,50 +285,11 @@ func repoAllButtons(box *gui.Node) {
|
|||
log.Warn("THINGS SEEM OK fullAutomation() returned true.")
|
||||
} else {
|
||||
log.Warn("THINGS FAILED fullAutomation() returned false")
|
||||
return
|
||||
return false
|
||||
}
|
||||
repo.status.Update()
|
||||
repo.newScan()
|
||||
}
|
||||
log.Warn("EVERYTHING WORKED")
|
||||
reposwin.Enable()
|
||||
})
|
||||
|
||||
grid1.NewButton("merge all devel to main", func() {
|
||||
reposwin.Disable()
|
||||
log.Info("merge all here")
|
||||
for _, repo := range me.allrepos {
|
||||
if repo.status.ReadOnly() {
|
||||
log.Info("skipping readonly", repo.String(), repo.dirtyLabel.String())
|
||||
continue
|
||||
}
|
||||
if repo.dirtyLabel.String() != "merge to main" {
|
||||
log.Info("skipping. not merge to main", repo.String(), repo.dirtyLabel.String())
|
||||
continue
|
||||
}
|
||||
if repo.status.CheckDirty() {
|
||||
log.Info("skipping dirty", repo.String(), repo.dirtyLabel.String())
|
||||
continue
|
||||
}
|
||||
log.Info("found", repo.String(), repo.dirtyLabel.String())
|
||||
// repo.status.Update()
|
||||
if repo.status.RunDevelMergeB() {
|
||||
log.Warn("THINGS SEEM OK fullAutomation() returned true.")
|
||||
} else {
|
||||
log.Warn("THINGS FAILED fullAutomation() returned false")
|
||||
return
|
||||
}
|
||||
repo.status.Update()
|
||||
repo.newScan()
|
||||
}
|
||||
log.Warn("EVERYTHING WORKED")
|
||||
reposwin.Enable()
|
||||
})
|
||||
|
||||
grid1.NewButton("status.Update() all", func() {
|
||||
for _, repo := range me.allrepos {
|
||||
repo.status.Update()
|
||||
repo.newScan()
|
||||
}
|
||||
})
|
||||
return true
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue