2024-01-16 04:46:17 -06:00
|
|
|
package main
|
|
|
|
|
2024-01-18 00:58:14 -06:00
|
|
|
import (
|
2024-01-18 05:03:04 -06:00
|
|
|
"go.wit.com/gui"
|
2024-01-18 00:58:14 -06:00
|
|
|
"go.wit.com/log"
|
2024-01-16 04:46:17 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
func globalResetOptions(box *gui.Node) {
|
2024-01-16 11:56:55 -06:00
|
|
|
group2 := box.NewGroup("Global Destructive Options")
|
2024-01-18 00:58:14 -06:00
|
|
|
buildOptions := group2.NewGrid("buildOptions", 2, 1)
|
2024-01-16 04:46:17 -06:00
|
|
|
|
|
|
|
buildOptions.NewLabel("start over")
|
2024-01-18 00:58:14 -06:00
|
|
|
buildOptions.NewButton("rm ~/go/src & ~/go/pkg", func() {
|
2024-01-18 05:03:04 -06:00
|
|
|
for repo, _ := range me.allrepos {
|
2024-01-23 11:22:33 -06:00
|
|
|
// status := repo.getStatus()
|
|
|
|
if repo.status.CheckDirty() {
|
|
|
|
log.Warn("repo is dirty. commit your changes first", repo.String())
|
|
|
|
return
|
|
|
|
} else {
|
|
|
|
log.Warn("repo is not dirty", repo.String())
|
|
|
|
log.Warn("TODO: check things are pushed and check every dir in go/src/")
|
2024-01-16 04:46:17 -06:00
|
|
|
}
|
|
|
|
}
|
2024-01-23 11:22:33 -06:00
|
|
|
/*
|
|
|
|
newCmds = append(newCmds, []string{"cd", "/home/jcarr/"})
|
|
|
|
newCmds = append(newCmds, []string{"rm", "-rf", "go/src/"})
|
|
|
|
newCmds = append(newCmds, []string{"chmod", "700", "-R", "go/pkg/"})
|
|
|
|
newCmds = append(newCmds, []string{"rm", "-rf", "go/pkg/"})
|
|
|
|
if dirty {
|
|
|
|
newCmds = append(newCmds, []string{"can't do this with dirty repos"})
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
*/
|
2024-01-16 04:46:17 -06:00
|
|
|
})
|
|
|
|
buildOptions.NewSeparator("endStatusScans")
|
|
|
|
buildOptions.NewSeparator("endStatusScans")
|
|
|
|
}
|