2024-01-14 10:36:46 -06:00
|
|
|
// watch all your go git repos
|
2024-01-13 23:27:46 -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/lib/gadgets"
|
|
|
|
"go.wit.com/lib/gui/repostatus"
|
2024-01-13 23:27:46 -06:00
|
|
|
)
|
|
|
|
|
2024-01-14 10:36:46 -06:00
|
|
|
// the main window nodes
|
|
|
|
var reposwin *gadgets.BasicWindow
|
|
|
|
var reposbox *gui.Node
|
|
|
|
var reposgrid *gui.Node
|
|
|
|
var reposgroup *gui.Node
|
2024-01-16 04:46:17 -06:00
|
|
|
|
2024-01-18 05:03:04 -06:00
|
|
|
var me *repoType
|
2024-01-16 04:46:17 -06:00
|
|
|
|
|
|
|
type repoType struct {
|
2024-01-18 05:03:04 -06:00
|
|
|
script [][]string
|
|
|
|
allrepos map[*repo]string
|
|
|
|
myGui *gui.Node
|
2024-01-16 11:56:55 -06:00
|
|
|
|
|
|
|
// #### autotypist window
|
|
|
|
autotypistWindow *gadgets.BasicWindow
|
|
|
|
// #### autotypist Global Display Options
|
2024-01-16 11:14:30 -06:00
|
|
|
autoHidePerfect *gui.Node
|
2024-01-16 04:46:17 -06:00
|
|
|
|
2024-01-16 11:56:55 -06:00
|
|
|
// #### autotypist Global Build Options
|
|
|
|
// what to change all the branches to
|
|
|
|
// so, as a developer, you can move all the repos
|
|
|
|
// to the 'devel' branch and then test a devel branch build
|
|
|
|
// then switch back to your 'username' branch and do a build there
|
|
|
|
toMoveToBranch string
|
|
|
|
|
|
|
|
// displays the preferred names used for the repo tree state
|
2024-01-18 00:58:14 -06:00
|
|
|
mainBranch *gadgets.BasicCombobox
|
2024-01-16 04:46:17 -06:00
|
|
|
develBranch *gadgets.BasicCombobox
|
2024-01-18 00:58:14 -06:00
|
|
|
userBranch *gadgets.BasicCombobox
|
2024-01-16 11:56:55 -06:00
|
|
|
|
2024-01-18 05:03:04 -06:00
|
|
|
// this button will regenerate everyones go.mod & go.sum
|
|
|
|
rerunGoMod *gui.Node
|
2024-01-16 11:56:55 -06:00
|
|
|
// #### autotypist Global Distructive & Reset Options
|
|
|
|
// #### autotypist window end
|
2024-01-16 04:46:17 -06:00
|
|
|
}
|
|
|
|
|
2024-01-15 08:11:08 -06:00
|
|
|
var cmds *gui.Node
|
|
|
|
var doit *gui.Node
|
2024-01-15 12:43:08 -06:00
|
|
|
var dryrun *gui.Node
|
2024-01-13 23:27:46 -06:00
|
|
|
|
|
|
|
type repo struct {
|
2024-01-18 00:58:14 -06:00
|
|
|
hidden bool
|
|
|
|
path string
|
2024-01-13 23:27:46 -06:00
|
|
|
lasttagrev string
|
2024-01-18 00:58:14 -06:00
|
|
|
lasttag string
|
2024-01-15 08:11:08 -06:00
|
|
|
// tags []string
|
2024-01-13 23:27:46 -06:00
|
|
|
|
|
|
|
pLabel *gui.Node // path label
|
2024-01-15 08:11:08 -06:00
|
|
|
// bLabel *gui.Node // branch label
|
|
|
|
lastTag *gui.Node // last tagged version label
|
2024-01-18 00:58:14 -06:00
|
|
|
vLabel *gui.Node // version label
|
2024-01-13 23:27:46 -06:00
|
|
|
// tagsDrop *gui.Node // list of all tags
|
|
|
|
dirtyLabel *gui.Node // git state (dirty or not?)
|
|
|
|
|
2024-01-18 00:58:14 -06:00
|
|
|
masterName *gui.Node // the master branch name
|
2024-01-13 23:27:46 -06:00
|
|
|
masterVersion *gui.Node // the master branch version
|
2024-01-18 00:58:14 -06:00
|
|
|
develName *gui.Node // the devel branch name
|
|
|
|
develVersion *gui.Node // the devel branch version
|
|
|
|
userName *gui.Node // the jcarr branch name
|
|
|
|
userVersion *gui.Node // the jcarr branch version
|
2024-01-13 23:27:46 -06:00
|
|
|
|
2024-01-18 00:58:14 -06:00
|
|
|
cButton *gui.Node // commit button
|
|
|
|
pButton *gui.Node // push button
|
2024-01-16 11:14:30 -06:00
|
|
|
showButton *gui.Node // the button!
|
2024-01-13 23:27:46 -06:00
|
|
|
|
|
|
|
status *repostatus.RepoStatus
|
|
|
|
}
|