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})
|
||||
}
|
||||
|
|
83
repolist.go
83
repolist.go
|
@ -201,37 +201,40 @@ func repoAllButtons(box *gui.Node) {
|
|||
|
||||
grid1.NewButton("merge all user to devel", 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 devel" {
|
||||
log.Info("skipping. not merge to devel", 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")
|
||||
if ! mergeAllUserToDevel() {
|
||||
return
|
||||
}
|
||||
repo.status.Update()
|
||||
repo.newScan()
|
||||
}
|
||||
log.Warn("EVERYTHING WORKED")
|
||||
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() {
|
||||
|
@ -252,19 +255,41 @@ 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()
|
||||
})
|
||||
return true
|
||||
}
|
||||
|
||||
grid1.NewButton("status.Update() all", func() {
|
||||
func mergeAllUserToDevel() 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 devel" {
|
||||
log.Info("skipping. not merge to devel", 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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue