releaser went through the whole process this time
This commit is contained in:
parent
09d595fd53
commit
27b10fdc73
20
doRelease.go
20
doRelease.go
|
@ -200,26 +200,6 @@ func doRelease() error {
|
||||||
}
|
}
|
||||||
log.Info("EVERYTHING OK. RERELEASED", me.current.GetGoPath())
|
log.Info("EVERYTHING OK. RERELEASED", me.current.GetGoPath())
|
||||||
|
|
||||||
return skipToNext()
|
|
||||||
}
|
|
||||||
|
|
||||||
func skipToNext() error {
|
|
||||||
me.current.Reload()
|
|
||||||
me.forge.SetConfigSave(true)
|
|
||||||
me.forge.ConfigSave()
|
|
||||||
log.Info("sleep 2")
|
|
||||||
time.Sleep(2 * time.Second)
|
|
||||||
printDone()
|
|
||||||
|
|
||||||
rePrepareRelease()
|
|
||||||
findNext()
|
|
||||||
if me.current == nil {
|
|
||||||
log.Info("NOT GOOD TO RUN ANOTHER DAY")
|
|
||||||
log.Info("took out all the loop code")
|
|
||||||
setCurrentRepo(nil, "loop by hand motherfucker", "fucknuts")
|
|
||||||
return fmt.Errorf("findNext returned next repo == nil")
|
|
||||||
}
|
|
||||||
log.Info("GOOD TO RUN ANOTHER DAY ON:", me.current.GetGoPath())
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,17 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
"time"
|
||||||
|
|
||||||
"go.wit.com/gui"
|
"go.wit.com/gui"
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
|
|
||||||
"go.wit.com/lib/gadgets"
|
"go.wit.com/lib/gadgets"
|
||||||
"go.wit.com/lib/gui/repolist"
|
"go.wit.com/lib/gui/repolist"
|
||||||
|
"go.wit.com/lib/gui/shell"
|
||||||
|
"go.wit.com/lib/protobuf/forgepb"
|
||||||
|
"go.wit.com/lib/protobuf/gitpb"
|
||||||
)
|
)
|
||||||
|
|
||||||
type releaseStruct struct {
|
type releaseStruct struct {
|
||||||
|
@ -122,24 +128,56 @@ func createReleaseBox(box *gui.Node) {
|
||||||
grid = group.NewGrid("buildOptions", 0, 0)
|
grid = group.NewGrid("buildOptions", 0, 0)
|
||||||
grid.NewButton("doRelease() all", func() {
|
grid.NewButton("doRelease() all", func() {
|
||||||
buttonDisable()
|
buttonDisable()
|
||||||
|
doReleaseAll()
|
||||||
|
buttonEnable()
|
||||||
|
})
|
||||||
|
grid.NextRow()
|
||||||
|
}
|
||||||
|
|
||||||
|
func doReleaseAll() {
|
||||||
count := 0
|
count := 0
|
||||||
for {
|
for {
|
||||||
log.Info("START doRelease() LOOP count =", count, "len me.done =", len(me.done))
|
log.Info("START doRelease() LOOP count =", count, "len me.done =", len(me.done))
|
||||||
if err := doRelease(); err != nil {
|
if err := doRelease(); err != nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
me.forge.CheckDirty()
|
if err := skipToNext(); err != nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
count += 1
|
count += 1
|
||||||
|
if count > me.forge.Repos.Len() {
|
||||||
// never allow a loop longer than all the known repos
|
// never allow a loop longer than all the known repos
|
||||||
// this probably doesn't matter, but often this code is wrong
|
// this probably doesn't matter, but often this code is wrong
|
||||||
if count > me.forge.Repos.Len() {
|
|
||||||
// so this is a safety check. never remove this check.
|
// so this is a safety check. never remove this check.
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buttonEnable()
|
}
|
||||||
})
|
|
||||||
grid.NextRow()
|
func skipToNext() error {
|
||||||
|
shell.RunVerbose([]string{"forge", "dirty"})
|
||||||
|
log.Info("Sleeping for 10 seconds. Forge file should have been rewritten")
|
||||||
|
time.Sleep(10)
|
||||||
|
me.forge = forgepb.Init()
|
||||||
|
me.found = new(gitpb.Repos)
|
||||||
|
|
||||||
|
me.current.Reload()
|
||||||
|
me.forge.SetConfigSave(true)
|
||||||
|
me.forge.ConfigSave()
|
||||||
|
log.Info("sleep 2")
|
||||||
|
time.Sleep(2 * time.Second)
|
||||||
|
printDone()
|
||||||
|
|
||||||
|
rePrepareRelease()
|
||||||
|
findNext()
|
||||||
|
if me.current == nil {
|
||||||
|
log.Info("NOT GOOD TO RUN ANOTHER DAY")
|
||||||
|
log.Info("took out all the loop code")
|
||||||
|
setCurrentRepo(nil, "loop by hand motherfucker", "fucknuts")
|
||||||
|
return fmt.Errorf("findNext returned next repo == nil")
|
||||||
|
}
|
||||||
|
log.Info("GOOD TO RUN ANOTHER DAY ON:", me.current.GetGoPath())
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func buttonDisable() {
|
func buttonDisable() {
|
||||||
|
|
Loading…
Reference in New Issue