added way to unwind missed repos
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
7f0f36a886
commit
a0f5c25e2f
|
@ -3,6 +3,7 @@ package main
|
|||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"go.wit.com/gui"
|
||||
"go.wit.com/lib/debugger"
|
||||
|
@ -109,6 +110,9 @@ func globalDisplayOptions(box *gui.Node) {
|
|||
if whitelist(repo.String()) {
|
||||
continue
|
||||
}
|
||||
if repo.status.ReadOnly() {
|
||||
continue
|
||||
}
|
||||
if repo.status.MakeRedomod() {
|
||||
log.Info("redo go.sum failed on", repo.String())
|
||||
// me.Enable()
|
||||
|
@ -128,6 +132,9 @@ func globalDisplayOptions(box *gui.Node) {
|
|||
if whitelist(repo.String()) {
|
||||
continue
|
||||
}
|
||||
if repo.status.ReadOnly() {
|
||||
continue
|
||||
}
|
||||
repo.status.RunCmd([]string{"rm", "-f", "go.mod", "go.sum"})
|
||||
}
|
||||
me.Enable()
|
||||
|
@ -146,6 +153,49 @@ func globalDisplayOptions(box *gui.Node) {
|
|||
me.Enable()
|
||||
})
|
||||
|
||||
group1.NewButton("git ls-files |grep go.mod", func() {
|
||||
// var all []string
|
||||
for _, repo := range me.allrepos {
|
||||
log.Info("repo:", repo.String())
|
||||
if repo.status.ReadOnly() {
|
||||
continue
|
||||
}
|
||||
if whitelist(repo.String()) {
|
||||
log.Warn("skipping whitelist", repo.String())
|
||||
continue
|
||||
}
|
||||
good, files := repo.status.GitLsFiles()
|
||||
if !good {
|
||||
log.Warn("Something went wrong", repo.String())
|
||||
continue
|
||||
}
|
||||
for _, filename := range strings.Split(files, "\n") {
|
||||
log.Info("\tfile", filename)
|
||||
if filename == "go.mod" {
|
||||
log.Info("Found go.mod. does version match release version?")
|
||||
log.Info(repo.lastTag.String(), "vs", repo.targetVersion.String())
|
||||
if repo.lastTag.String() != repo.targetVersion.String() {
|
||||
log.Info(repo.lastTag.String(), "vs", repo.targetVersion.String())
|
||||
log.Info("Found go.sum. version mismatch")
|
||||
setCurrentRepo(repo, "VERY BROKEN", "rewind go.mod commit")
|
||||
return
|
||||
}
|
||||
}
|
||||
if filename == "go.sum" {
|
||||
log.Info("Found go.sum. does version match release version?")
|
||||
log.Info(repo.lastTag.String(), "vs", repo.targetVersion.String())
|
||||
if repo.lastTag.String() != repo.targetVersion.String() {
|
||||
log.Info(repo.lastTag.String(), "vs", repo.targetVersion.String())
|
||||
log.Info("Found go.sum. version mismatch")
|
||||
setCurrentRepo(repo, "VERY BROKEN", "rewind go.mod commit")
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
log.Info("All repos seem okay")
|
||||
})
|
||||
|
||||
group2 := vbox.NewGroup("Debugger")
|
||||
group2.NewButton("logging Window", func() {
|
||||
logsettings.LogWindow()
|
||||
|
|
|
@ -138,7 +138,7 @@ func createReleaseBox(box *gui.Node) {
|
|||
|
||||
var all [][]string
|
||||
all = append(all, []string{"git", "add", "-f", "go.mod"})
|
||||
if release.status.String() == "PRIMATIVE" {
|
||||
if release.current.status.CheckPrimativeGoMod() {
|
||||
// don't add go.sum here. TODO: check for go.sum file and fail
|
||||
} else {
|
||||
all = append(all, []string{"git", "add", "-f", "go.sum"})
|
||||
|
|
|
@ -117,6 +117,12 @@ func rerelease() bool {
|
|||
|
||||
log.Info("\treset to devel", curName, release.version.String(), me.releaseReasonS)
|
||||
|
||||
// git checkout devel
|
||||
// git branch -D master
|
||||
// git branch master
|
||||
// git checkout master
|
||||
// git push --set-upstream --force origin master
|
||||
|
||||
var all [][]string
|
||||
all = append(all, []string{"git", "checkout", "devel"})
|
||||
all = append(all, []string{"git", "branch", "-D", mName})
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash -x
|
||||
|
||||
if [ "$1" == "guimaster" ]; then
|
||||
git checkout devel
|
||||
git branch -D guimaster
|
||||
git branch guimaster
|
||||
git checkout guimaster
|
||||
git push --set-upstream --force origin guimaster
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$1" == "master" ]; then
|
||||
git checkout devel
|
||||
git branch -D master
|
||||
git branch master
|
||||
git checkout master
|
||||
git push --set-upstream --force origin master
|
||||
exit
|
||||
fi
|
||||
|
Loading…
Reference in New Issue