summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-20 14:44:38 -0600
committerJeff Carr <[email protected]>2024-02-20 14:44:38 -0600
commite927975dc890216c7172f711222cfdf283c0dd1c (patch)
tree44bf3b5a0cbba18fea5fd94182bb591d63b44f15 /main.go
parentd84420e443315d14d408a458d486c2b7a805037f (diff)
reorg interface. it's almost working again
Diffstat (limited to 'main.go')
-rw-r--r--main.go23
1 files changed, 17 insertions, 6 deletions
diff --git a/main.go b/main.go
index 3a7d1fe..5f0068a 100644
--- a/main.go
+++ b/main.go
@@ -45,9 +45,6 @@ func main() {
me.mainWindow = me.myGui.NewWindow("GUI release manager")
me.mainBox = me.mainWindow.NewBox("bw hbox", true)
- // the left side of the window options
- globalDisplayOptions(me.mainBox)
-
// sanity check of things that might be around that mess
// up things later
// if you have a go.work file, you must delete it
@@ -73,13 +70,16 @@ func main() {
log.Info("Creating the Release Window")
- // scan in the repo map first
- // hopefully this is the list of all the golang packages and only the GUI golang packages
+ // initialize the repo list window
+ // which should be all the git repositories in ~/go/src & the .config file
me.repos = makeRepoView()
// register a Show/Hide function for the repo list table
me.repos.View.RegisterHideFunction(showHideRepos)
+ // the left side of the window options
+ globalDisplayOptions(me.mainBox)
+
// create the right side of the main window
createReleaseBox(me.mainBox)
@@ -91,6 +91,8 @@ func main() {
// so I can't trust even what I see. It's complicated right now still.
release.openrepo.Disable()
+ log.Sleep(5)
+
// parse config file and scan for .git repos
me.repos.initRepoList()
@@ -110,8 +112,15 @@ func main() {
// start the initail scan and make sure each repo is set
// to the master branch
-func setBranchToMaster() {
+func setAllBranchesToMaster() bool {
+ var worked bool = true
for _, repo := range me.repos.View.AllRepos() {
+ if repo.ReadOnly() {
+ continue
+ }
+ if repo.IsDirty() {
+ continue
+ }
if whitelist(repo.GoPath()) {
continue
}
@@ -119,9 +128,11 @@ func setBranchToMaster() {
log.Warn("git checkout master branch worked", repo.Name())
} else {
log.Warn("git checkout master branch failed", repo.Name())
+ worked = false
}
// repo.NewScan()
}
+ return worked
}
func setTargetVersion() {