ready to check for valid repos
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
3094c6283c
commit
c401c60399
|
@ -51,44 +51,6 @@ func globalDisplayOptions(box *gui.Node) {
|
||||||
globalDisplaySetRepoState()
|
globalDisplaySetRepoState()
|
||||||
reposwin.Toggle()
|
reposwin.Toggle()
|
||||||
})
|
})
|
||||||
/*
|
|
||||||
group1.NewButton("Create Release Window", func() {
|
|
||||||
if release.win == nil {
|
|
||||||
log.Info("Creating the Release Window")
|
|
||||||
createReleaseWindow()
|
|
||||||
log.Info("Toggling the Release Window")
|
|
||||||
release.win.Toggle()
|
|
||||||
}
|
|
||||||
log.Info("Toggling the Release Window")
|
|
||||||
release.openrepo.Disable()
|
|
||||||
for _, repo := range me.allrepos {
|
|
||||||
repo.newScan()
|
|
||||||
}
|
|
||||||
reposwin.Toggle()
|
|
||||||
release.win.Toggle()
|
|
||||||
})
|
|
||||||
group1.NewButton("Create Release Window (fullscan)", func() {
|
|
||||||
if release.win == nil {
|
|
||||||
log.Info("Creating the Release Window")
|
|
||||||
createReleaseWindow()
|
|
||||||
for _, repo := range me.allrepos {
|
|
||||||
repo.status.Update()
|
|
||||||
repo.newScan()
|
|
||||||
}
|
|
||||||
globalDisplaySetRepoState()
|
|
||||||
// open the repo window
|
|
||||||
reposwin.Toggle()
|
|
||||||
log.Info("Toggling the Release Window")
|
|
||||||
release.win.Toggle()
|
|
||||||
}
|
|
||||||
log.Info("Toggling the Release Window")
|
|
||||||
release.win.Toggle()
|
|
||||||
release.openrepo.Disable()
|
|
||||||
for _, repo := range me.allrepos {
|
|
||||||
repo.newScan()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
*/
|
|
||||||
|
|
||||||
me.autoHideReadOnly = group1.NewCheckbox("Hide read-only repos").SetChecked(true)
|
me.autoHideReadOnly = group1.NewCheckbox("Hide read-only repos").SetChecked(true)
|
||||||
me.autoHideReadOnly.Custom = func() {
|
me.autoHideReadOnly.Custom = func() {
|
||||||
|
|
19
main.go
19
main.go
|
@ -20,11 +20,8 @@ func main() {
|
||||||
|
|
||||||
me.myGui = gui.New()
|
me.myGui = gui.New()
|
||||||
me.myGui.InitEmbed(resToolkit)
|
me.myGui.InitEmbed(resToolkit)
|
||||||
// me.myGui.LoadToolkit("nocui")
|
|
||||||
me.myGui.Default()
|
me.myGui.Default()
|
||||||
|
|
||||||
// autotypistWindow()
|
|
||||||
|
|
||||||
me.mainWindow = me.myGui.NewWindow("GUI release manager")
|
me.mainWindow = me.myGui.NewWindow("GUI release manager")
|
||||||
me.mainBox = me.mainWindow.NewBox("bw hbox", true)
|
me.mainBox = me.mainWindow.NewBox("bw hbox", true)
|
||||||
|
|
||||||
|
@ -36,17 +33,11 @@ func main() {
|
||||||
repo.status.Update()
|
repo.status.Update()
|
||||||
repo.newScan()
|
repo.newScan()
|
||||||
}
|
}
|
||||||
if release.win == nil {
|
log.Info("Creating the Release Window")
|
||||||
log.Info("Creating the Release Window")
|
|
||||||
createReleaseWindow(me.mainBox)
|
createReleaseBox(me.mainBox)
|
||||||
globalDisplaySetRepoState()
|
globalDisplaySetRepoState()
|
||||||
// open the repo window
|
|
||||||
reposwin.Toggle()
|
|
||||||
log.Info("Toggling the Release Window")
|
|
||||||
release.win.Toggle()
|
|
||||||
}
|
|
||||||
log.Info("Toggling the Release Window")
|
|
||||||
release.win.Toggle()
|
|
||||||
release.openrepo.Disable()
|
release.openrepo.Disable()
|
||||||
|
|
||||||
// scan repos every 30 seconds
|
// scan repos every 30 seconds
|
||||||
|
|
|
@ -18,7 +18,7 @@ var release releaseStruct
|
||||||
type releaseStruct struct {
|
type releaseStruct struct {
|
||||||
current *repo
|
current *repo
|
||||||
|
|
||||||
win *gadgets.BasicWindow
|
// win *gadgets.BasicWindow
|
||||||
box *gui.Node
|
box *gui.Node
|
||||||
group *gui.Node
|
group *gui.Node
|
||||||
grid *gui.Node
|
grid *gui.Node
|
||||||
|
@ -39,28 +39,19 @@ type releaseStruct struct {
|
||||||
checkSafeB *gui.Node
|
checkSafeB *gui.Node
|
||||||
}
|
}
|
||||||
|
|
||||||
func createReleaseWindow(box *gui.Node) {
|
func (w *autoType) Disable() {
|
||||||
/*
|
w.mainWindow.Disable()
|
||||||
if release.win != nil {
|
}
|
||||||
release.win.Toggle()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
func (w *autoType) Enable() {
|
||||||
|
w.mainWindow.Enable()
|
||||||
|
}
|
||||||
|
|
||||||
|
func createReleaseBox(box *gui.Node) {
|
||||||
versionS := "0.17.0"
|
versionS := "0.17.0"
|
||||||
reasonS := "gocui"
|
reasonS := "gocui"
|
||||||
partS := strings.Split(versionS, ".")
|
partS := strings.Split(versionS, ".")
|
||||||
|
|
||||||
/*
|
|
||||||
release.win = gadgets.NewBasicWindow(me.myGui, "Make a new release")
|
|
||||||
release.win.Custom = func() {
|
|
||||||
log.Info("Release Window close")
|
|
||||||
}
|
|
||||||
|
|
||||||
release.win.Make()
|
|
||||||
release.win.StandardClose()
|
|
||||||
release.win.Draw()
|
|
||||||
*/
|
|
||||||
release.box = box
|
release.box = box
|
||||||
release.group = release.box.NewGroup("things")
|
release.group = release.box.NewGroup("things")
|
||||||
release.grid = release.group.NewGrid("buildOptions", 2, 1)
|
release.grid = release.group.NewGrid("buildOptions", 2, 1)
|
||||||
|
@ -68,18 +59,29 @@ func createReleaseWindow(box *gui.Node) {
|
||||||
// do an initial scan of all the repos
|
// do an initial scan of all the repos
|
||||||
scanGoSum()
|
scanGoSum()
|
||||||
|
|
||||||
release.grid.NewButton("findNextDirty()", func() {
|
release.grid.NewButton("findNextBad()", func() {
|
||||||
release.win.Disable()
|
me.Disable()
|
||||||
if findNextDirty() {
|
if findNextBad() {
|
||||||
log.Info("findNextDirty() found a repo")
|
log.Info("findNextBad() found a repo")
|
||||||
release.win.Enable()
|
me.Enable()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
release.win.Enable()
|
me.Enable()
|
||||||
})
|
})
|
||||||
|
release.grid.NewButton("find next Bad", func() {
|
||||||
|
me.Disable()
|
||||||
|
if findNextDirty() {
|
||||||
|
log.Info("findNextDirty() found a repo")
|
||||||
|
me.Enable()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
me.Enable()
|
||||||
|
})
|
||||||
|
/*
|
||||||
release.grid.NewButton("nil", func() {
|
release.grid.NewButton("nil", func() {
|
||||||
log.Info("just filling the grid")
|
log.Info("just filling the grid")
|
||||||
})
|
})
|
||||||
|
*/
|
||||||
release.grid.NewButton("next repo", func() {
|
release.grid.NewButton("next repo", func() {
|
||||||
buttonDisable()
|
buttonDisable()
|
||||||
defer buttonEnable()
|
defer buttonEnable()
|
||||||
|
@ -279,33 +281,11 @@ func createReleaseWindow(box *gui.Node) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func buttonDisable() {
|
func buttonDisable() {
|
||||||
release.win.Disable()
|
me.Disable()
|
||||||
/*
|
|
||||||
release.nextRepoB.Disable()
|
|
||||||
release.openRepoB.Disable()
|
|
||||||
release.goGetB.Disable()
|
|
||||||
release.makeRedomodB.Disable()
|
|
||||||
release.checkGoSumB.Disable()
|
|
||||||
release.openrepo.Disable()
|
|
||||||
release.checkDirtyB.Disable()
|
|
||||||
release.sendVersionB.Disable()
|
|
||||||
release.checkSafeB.Disable()
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func buttonEnable() {
|
func buttonEnable() {
|
||||||
release.win.Enable()
|
me.Enable()
|
||||||
/*
|
|
||||||
release.nextRepoB.Enable()
|
|
||||||
release.openRepoB.Enable()
|
|
||||||
release.goGetB.Enable()
|
|
||||||
release.makeRedomodB.Enable()
|
|
||||||
release.checkGoSumB.Enable()
|
|
||||||
release.openrepo.Enable()
|
|
||||||
release.checkDirtyB.Enable()
|
|
||||||
release.sendVersionB.Enable()
|
|
||||||
release.checkSafeB.Enable()
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func findDirty2() bool {
|
func findDirty2() bool {
|
||||||
|
@ -351,6 +331,21 @@ func setCurrentRepo(newcur *repo, s string, note string) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func findNextBad() bool {
|
||||||
|
for _, repo := range me.allrepos {
|
||||||
|
goSumS := repo.getGoSumStatus()
|
||||||
|
dirtyS := repo.dirtyLabel.String()
|
||||||
|
|
||||||
|
log.Info("findNextDirty()", repo.String(), goSumS, dirtyS)
|
||||||
|
if goSumS == "BAD" {
|
||||||
|
if setCurrentRepo(repo, "primative not committed", "release new version") {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
func findNextDirty() bool {
|
func findNextDirty() bool {
|
||||||
for _, repo := range me.allrepos {
|
for _, repo := range me.allrepos {
|
||||||
goSumS := repo.getGoSumStatus()
|
goSumS := repo.getGoSumStatus()
|
||||||
|
|
|
@ -19,7 +19,7 @@ type autoType struct {
|
||||||
allrepos map[string]*repo
|
allrepos map[string]*repo
|
||||||
myGui *gui.Node
|
myGui *gui.Node
|
||||||
|
|
||||||
autotypistWindow *gadgets.BasicWindow
|
// autotypistWindow *gadgets.BasicWindow
|
||||||
mainWindow *gui.Node
|
mainWindow *gui.Node
|
||||||
mainBox *gui.Node
|
mainBox *gui.Node
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue