tracked down 'dirty' not showing up
This commit is contained in:
parent
8e2a557b25
commit
9d97b94616
2
Makefile
2
Makefile
|
@ -2,8 +2,6 @@ VERSION = $(shell git describe --tags)
|
||||||
BUILDTIME = $(shell date +%Y.%m.%d)
|
BUILDTIME = $(shell date +%Y.%m.%d)
|
||||||
|
|
||||||
info: install
|
info: install
|
||||||
@echo "make restart # remove the repos.pb file"
|
|
||||||
@echo "make pull-mine # run git pull on my repos"
|
|
||||||
forge
|
forge
|
||||||
|
|
||||||
vet:
|
vet:
|
||||||
|
|
|
@ -35,12 +35,14 @@ func doGitPull() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func doCheckDirtyAndConfigSave() {
|
func doCheckDirtyAndConfigSave() {
|
||||||
|
var count int
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
all := me.found.SortByFullPath()
|
all := me.found.SortByFullPath()
|
||||||
for all.Scan() {
|
for all.Scan() {
|
||||||
repo := all.Next()
|
repo := all.Next()
|
||||||
dirty := repo.IsDirty()
|
dirty := repo.IsDirty()
|
||||||
if repo.CheckDirty() {
|
if repo.CheckDirty() {
|
||||||
|
count += 1
|
||||||
me.found.AppendUniqueGoPath(repo)
|
me.found.AppendUniqueGoPath(repo)
|
||||||
if !dirty {
|
if !dirty {
|
||||||
configSave = true
|
configSave = true
|
||||||
|
@ -51,7 +53,7 @@ func doCheckDirtyAndConfigSave() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.Info("dirty check took:", shell.FormatDuration(time.Since(now)))
|
log.Printf("dirty check %d took:%s\n", count, shell.FormatDuration(time.Since(now)))
|
||||||
me.forge.SetConfigSave(configSave)
|
me.forge.SetConfigSave(configSave)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
15
doGui.go
15
doGui.go
|
@ -4,14 +4,29 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.wit.com/gui"
|
"go.wit.com/gui"
|
||||||
|
"go.wit.com/lib/debugger"
|
||||||
"go.wit.com/lib/gadgets"
|
"go.wit.com/lib/gadgets"
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func debug() {
|
||||||
|
log.Info("cmd line --debugger == true")
|
||||||
|
go func() {
|
||||||
|
log.Sleep(3)
|
||||||
|
log.Info("cmd line --debugger == true")
|
||||||
|
log.Info("cmd line --debugger == true")
|
||||||
|
log.Info("cmd line --debugger == true")
|
||||||
|
log.Info("cmd line --debugger == true")
|
||||||
|
debugger.DebugWindow()
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
|
||||||
func doGui() {
|
func doGui() {
|
||||||
me.myGui = gui.New()
|
me.myGui = gui.New()
|
||||||
me.myGui.Default()
|
me.myGui.Default()
|
||||||
|
|
||||||
|
// debug()
|
||||||
|
|
||||||
me.mainWindow = gadgets.RawBasicWindow("Forge: (this doesn't work yet)")
|
me.mainWindow = gadgets.RawBasicWindow("Forge: (this doesn't work yet)")
|
||||||
me.mainWindow.Make()
|
me.mainWindow.Make()
|
||||||
me.mainWindow.Show()
|
me.mainWindow.Show()
|
||||||
|
|
4
main.go
4
main.go
|
@ -174,6 +174,10 @@ func main() {
|
||||||
|
|
||||||
// open the gui unless the user performed some other
|
// open the gui unless the user performed some other
|
||||||
// basically, if you run just 'forge' it should open the GUI
|
// basically, if you run just 'forge' it should open the GUI
|
||||||
|
|
||||||
|
// if opening the GUI, always check git for dirty repos
|
||||||
|
findAll() // select all the repos
|
||||||
|
doCheckDirtyAndConfigSave()
|
||||||
doGui()
|
doGui()
|
||||||
okExit("")
|
okExit("")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue