track down logic error on detecting go 'primitive' packages
This commit is contained in:
parent
9b9df05f33
commit
d6ecd246e0
|
@ -103,13 +103,15 @@ func doRelease() bool {
|
||||||
pb := me.forge.Repos.FindByGoPath(me.current.GoPath())
|
pb := me.forge.Repos.FindByGoPath(me.current.GoPath())
|
||||||
if pb != nil {
|
if pb != nil {
|
||||||
pb.UpdatePublished()
|
pb.UpdatePublished()
|
||||||
if !pb.GetGoPrimitive() {
|
/* remove. earlier protected against nil
|
||||||
|
if !pb.IsPrimitive() {
|
||||||
loop := pb.Published.SortByGoPath()
|
loop := pb.Published.SortByGoPath()
|
||||||
for loop.Scan() {
|
for loop.Scan() {
|
||||||
t := loop.Next()
|
t := loop.Next()
|
||||||
log.Info("new Published dep:", t.GetGoPath(), t.GetVersion())
|
log.Info("new Published dep:", t.GetGoPath(), t.GetVersion())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
me.forge.Repos.ConfigSave()
|
me.forge.Repos.ConfigSave()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
35
findNext.go
35
findNext.go
|
@ -39,21 +39,50 @@ func findNext() bool {
|
||||||
log.Info("findNext() skipping dirty")
|
log.Info("findNext() skipping dirty")
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
log.Info("findNext()", repo.GoPath(), "is not a primative repo")
|
|
||||||
if findFix {
|
if findFix {
|
||||||
log.Info("findFix is true. running fixGoDeps()")
|
log.Info("findFix is true. running fixGoDeps()")
|
||||||
fixGodeps(check)
|
if fixGodeps(check) {
|
||||||
|
log.Info("fixGoDeps() returned true")
|
||||||
|
} else {
|
||||||
|
log.Info("fixGoDeps() returned false")
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
findCounter += 1
|
findCounter += 1
|
||||||
|
if check.Exists("go.mod") {
|
||||||
|
log.Info("go.mod exists here")
|
||||||
|
} else {
|
||||||
|
log.Info("go.mod is gone here")
|
||||||
|
}
|
||||||
if ok, err := check.ParseGoSum(); !ok {
|
if ok, err := check.ParseGoSum(); !ok {
|
||||||
log.Info("ParseGoSum() failed (probably repo needs go mod tidy)", err)
|
log.Info("ParseGoSum() failed (probably repo needs go mod tidy)", err)
|
||||||
log.Info("ParseGoSum() findFix =", findFix, "findCounter =", findCounter)
|
log.Info("ParseGoSum() findFix =", findFix, "findCounter =", findCounter)
|
||||||
|
if check.Exists("go.mod") {
|
||||||
|
log.Info("go.mod exists here")
|
||||||
|
} else {
|
||||||
|
log.Info("go.mod is gone here")
|
||||||
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if check.Exists("go.mod") {
|
||||||
|
log.Info("go.mod exists here")
|
||||||
|
} else {
|
||||||
|
log.Info("go.mod is gone here")
|
||||||
|
}
|
||||||
if me.forge.FinalGoDepsCheckOk(check) {
|
if me.forge.FinalGoDepsCheckOk(check) {
|
||||||
setCurrentRepo(repo, "should be good to release", "pretty sure")
|
setCurrentRepo(repo, "should be good to release", "pretty sure")
|
||||||
|
if check.Exists("go.mod") {
|
||||||
|
log.Info("go.mod exists here")
|
||||||
|
} else {
|
||||||
|
log.Info("go.mod is gone here")
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
if check.Exists("go.mod") {
|
||||||
|
log.Info("go.mod exists here")
|
||||||
|
} else {
|
||||||
|
log.Info("go.mod is gone here")
|
||||||
|
}
|
||||||
log.Info("findNext() got to the end. repo", repo.GoPath(), "did not work. trying to find a new one now")
|
log.Info("findNext() got to the end. repo", repo.GoPath(), "did not work. trying to find a new one now")
|
||||||
}
|
}
|
||||||
if findCounter == 0 {
|
if findCounter == 0 {
|
||||||
|
@ -72,7 +101,7 @@ func fixGodeps(check *gitpb.Repo) bool {
|
||||||
var good bool = true
|
var good bool = true
|
||||||
// check if the package dependancies changed, if so, re-publish
|
// check if the package dependancies changed, if so, re-publish
|
||||||
// skip primative ones
|
// skip primative ones
|
||||||
if check.GetGoPrimitive() {
|
if ok, _ := check.IsPrimitive(); ok {
|
||||||
log.Info("fixGoDeps() skipping primitive", check.GoPath)
|
log.Info("fixGoDeps() skipping primitive", check.GoPath)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,5 +124,16 @@ func makePrepareRelease() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
findNext()
|
if findNext() {
|
||||||
|
log.Info("prepare release findNext() returned true")
|
||||||
|
me.release.box.Enable()
|
||||||
|
} else {
|
||||||
|
log.Info("prepare release findNext() returned false")
|
||||||
|
if findNext() {
|
||||||
|
log.Info("prepare release findNext() returned true")
|
||||||
|
me.release.box.Enable()
|
||||||
|
} else {
|
||||||
|
log.Info("prepare release findNext() returned false")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -233,8 +233,10 @@ func createReleaseBox(box *gui.Node) {
|
||||||
|
|
||||||
func buttonDisable() {
|
func buttonDisable() {
|
||||||
me.Disable()
|
me.Disable()
|
||||||
|
me.release.box.Disable()
|
||||||
}
|
}
|
||||||
|
|
||||||
func buttonEnable() {
|
func buttonEnable() {
|
||||||
me.Enable()
|
me.Enable()
|
||||||
|
me.release.box.Enable()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue