attempt to make debian packages on success
This commit is contained in:
parent
8efada2a54
commit
a128a45ef9
3
Makefile
3
Makefile
|
@ -55,9 +55,6 @@ curl-setBranchesToMasterB:
|
||||||
findNext:
|
findNext:
|
||||||
curl --silent http://localhost:9419/findNext
|
curl --silent http://localhost:9419/findNext
|
||||||
|
|
||||||
fixNext:
|
|
||||||
curl --silent http://localhost:9419/fixNext
|
|
||||||
|
|
||||||
showNext:
|
showNext:
|
||||||
curl --silent http://localhost:9419/showNext
|
curl --silent http://localhost:9419/showNext
|
||||||
|
|
||||||
|
|
80
findNext.go
80
findNext.go
|
@ -9,6 +9,7 @@ import (
|
||||||
|
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
|
|
||||||
|
"go.wit.com/lib/gui/shell"
|
||||||
"go.wit.com/lib/protobuf/gitpb"
|
"go.wit.com/lib/protobuf/gitpb"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -102,17 +103,6 @@ func findNext() bool {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
findCounter += 1
|
|
||||||
if !check.ParseGoSum() {
|
|
||||||
log.Info("ParseGoSum() failed", check.GetGoPath())
|
|
||||||
log.Info("ParseGoSum() failed", check.GetGoPath())
|
|
||||||
log.Info("ParseGoSum() failed", check.GetGoPath())
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// fixGodeps(check)
|
|
||||||
|
|
||||||
if err := me.forge.FinalGoDepsCheckOk(check, argv.Verbose); err != nil {
|
if err := me.forge.FinalGoDepsCheckOk(check, argv.Verbose); err != nil {
|
||||||
// if err := me.forge.FinalGoDepsCheckOk(check, false); err != nil {
|
// if err := me.forge.FinalGoDepsCheckOk(check, false); err != nil {
|
||||||
|
@ -128,6 +118,15 @@ func findNext() bool {
|
||||||
if findCounter == 0 {
|
if findCounter == 0 {
|
||||||
log.Info("NOTHING TO UPDATE. findCounter =", findCounter, "found len =", me.found.Len())
|
log.Info("NOTHING TO UPDATE. findCounter =", findCounter, "found len =", me.found.Len())
|
||||||
if me.found.Len() == 0 {
|
if me.found.Len() == 0 {
|
||||||
|
printDone()
|
||||||
|
log.Info("cd lib/; make debian")
|
||||||
|
wit := me.forge.FindByGoPath("go.wit.com/apps/utils/wit-test")
|
||||||
|
if wit != nil {
|
||||||
|
log.Info("cd", wit.GetFullPath())
|
||||||
|
os.Chdir(wit.GetFullPath())
|
||||||
|
shell.Exec([]string{"ls", "-l"})
|
||||||
|
shell.Exec([]string{"echo", "make", "debian-release-force"})
|
||||||
|
}
|
||||||
okExit("")
|
okExit("")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -139,65 +138,6 @@ func findNext() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// tries to fix the go.mod and go.sum files
|
|
||||||
func fixGodepsOLD(check *gitpb.Repo) bool {
|
|
||||||
var good bool = true
|
|
||||||
|
|
||||||
check.GoDeps = nil
|
|
||||||
|
|
||||||
if result, err := check.RunQuiet([]string{"go-mod-clean", "--strict"}); err != nil {
|
|
||||||
for _, line := range result.Stdout {
|
|
||||||
log.Warn("stdout:", line)
|
|
||||||
}
|
|
||||||
for _, line := range result.Stderr {
|
|
||||||
log.Warn("stderr:", line)
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if check.ParseGoSum() {
|
|
||||||
return true
|
|
||||||
} else {
|
|
||||||
log.Info("ParseGoSum() failed but go-mod-clean --strict worked", check.GetGoPath())
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
// skip primative ones
|
|
||||||
if check.GetGoPrimitive() {
|
|
||||||
if check.Exists("go.sum") {
|
|
||||||
log.Info("fixGoDeps() has go.sum but says it is primitive", check.GetGoPath())
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
log.Info("fixGoDeps() skipping primitive", check.GetGoPath())
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
log.Printf("current repo %s go dependancy count: %d\n", check.GetGoPath(), check.GoDepsLen())
|
|
||||||
log.Printf("current repo %s go dependancy count: %d\n", check.GetGoPath(), check.GoDepsLen())
|
|
||||||
log.Printf("current repo %s go dependancy count: %d\n", check.GetGoPath(), check.GoDepsLen())
|
|
||||||
deps := check.GoDeps.SortByGoPath()
|
|
||||||
for deps.Scan() {
|
|
||||||
depRepo := deps.Next()
|
|
||||||
// log.Info("found dep", depRepo.GetGoPath())
|
|
||||||
if me.forge.Config.IsReadOnly(depRepo.GetGoPath()) {
|
|
||||||
log.Info("IsReadOnly = true", depRepo.GetGoPath())
|
|
||||||
continue
|
|
||||||
} else {
|
|
||||||
// log.Info("IsReadOnly = false", depRepo.GetGoPath())
|
|
||||||
}
|
|
||||||
found := me.forge.FindByGoPath(depRepo.GetGoPath())
|
|
||||||
if found == nil {
|
|
||||||
log.Info("not found:", depRepo.GetGoPath())
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
log.Printf("%-48s dep ver=%10s repo ver=%10s target ver=%10s\n", found.GetGoPath(), depRepo.GetVersion(), found.GetMasterVersion(), found.GetTargetVersion())
|
|
||||||
if depRepo.GetVersion() != found.GetMasterVersion() {
|
|
||||||
log.Printf("%-48s %10s (gitpb depRepo)\n", depRepo.GetGoPath(), depRepo.GetVersion())
|
|
||||||
log.Printf("%-48s %10s (gitpb found)\n", found.GetGoPath(), found.GetMasterVersion())
|
|
||||||
cmd := []string{"go", "get", depRepo.GetGoPath() + "@latest"}
|
|
||||||
check.RunVerbose(cmd)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return good
|
|
||||||
}
|
|
||||||
|
|
||||||
func setCurrentRepo(check *gitpb.Repo, s string, note string) bool {
|
func setCurrentRepo(check *gitpb.Repo, s string, note string) bool {
|
||||||
me.current = check
|
me.current = check
|
||||||
if check == nil {
|
if check == nil {
|
||||||
|
|
10
http.go
10
http.go
|
@ -85,16 +85,6 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
setCurrentRepo(repo, "HTTP", "doRelease() ?")
|
setCurrentRepo(repo, "HTTP", "doRelease() ?")
|
||||||
return
|
return
|
||||||
case "/fixNext":
|
|
||||||
check := me.forge.FindByGoPath(me.current.GetGoPath())
|
|
||||||
if check == nil {
|
|
||||||
log.Info("boo, you didn't git clone", me.current.GetGoPath())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// destroy and recreate the go.sum
|
|
||||||
fixGodepsOLD(check)
|
|
||||||
findOk = true
|
|
||||||
return
|
|
||||||
case "/showNext":
|
case "/showNext":
|
||||||
check := me.forge.FindByGoPath(me.current.GetGoPath())
|
check := me.forge.FindByGoPath(me.current.GetGoPath())
|
||||||
if check == nil {
|
if check == nil {
|
||||||
|
|
|
@ -166,6 +166,8 @@ func rePrepareRelease() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// if check.GetGoPath() == "go.wit.com/log" {
|
// if check.GetGoPath() == "go.wit.com/log" {
|
||||||
|
log.Printf("edge case. don't retag. git log --oneline %s..%s\n", master, lastTag)
|
||||||
|
log.Printf("edge case. don't retag. git log --oneline %s..%s\n", lastTag, master)
|
||||||
log.Info("edge case. don't retag.", check.GetGoPath(), b1, b2)
|
log.Info("edge case. don't retag.", check.GetGoPath(), b1, b2)
|
||||||
log.Info("edge case. don't retag.", check.GetGoPath(), oldlhash, newmhash)
|
log.Info("edge case. don't retag.", check.GetGoPath(), oldlhash, newmhash)
|
||||||
// }
|
// }
|
||||||
|
@ -234,7 +236,8 @@ func printDone() {
|
||||||
for _, gopath := range me.done {
|
for _, gopath := range me.done {
|
||||||
log.Info("printDone() THESE WERE PUBLISHED", gopath)
|
log.Info("printDone() THESE WERE PUBLISHED", gopath)
|
||||||
}
|
}
|
||||||
log.Sleep(1)
|
log.Info("printDone() total finished so far:", len(me.done))
|
||||||
|
time.Sleep(time.Second)
|
||||||
}
|
}
|
||||||
|
|
||||||
func alreadyDone(repo *gitpb.Repo) bool {
|
func alreadyDone(repo *gitpb.Repo) bool {
|
||||||
|
|
Loading…
Reference in New Issue