diff --git a/prepareRelease.go b/prepareRelease.go index 45ecfe1..70d829b 100644 --- a/prepareRelease.go +++ b/prepareRelease.go @@ -50,10 +50,9 @@ func makePrepareRelease() { continue } + // run go-mod-clean on every repo to start if !runGoClean(check) { log.Info("go-mod-clean FAILED. THIS IS BAD.", check.GoPath) - log.Info("go-mod-clean FAILED. THIS IS BAD.", check.GoPath) - log.Info("go-mod-clean FAILED. THIS IS BAD.", check.GoPath) } } @@ -71,19 +70,32 @@ func makePrepareRelease() { if master != lastTag { // if v1.2.3 change to v.1.2.4 check.IncrementTargetRevision() + if !runGoClean(check) { + log.Info("go-mod-clean FAILED. THIS IS BAD.", check.GoPath) + } continue } // if the repo is a go binary, try forcing new go.* files - if check.RepoType() == "binary" { - // check if the package dependancies changed, if so, re-publish - if me.forge.FinalGoDepsCheckOk(check) { - log.Printf("go.sum is perfect! %s\n", check.GetGoPath()) - } else { - log.Printf("dependancy checks indicate a new release is needed for %s\n", check.GetGoPath()) - // if v1.2.3 change to v.1.2.4 - check.IncrementTargetRevision() - } + if check.RepoType() != "binary" { + // master and lasttag match and it's not a binary. everything is fine + continue + } + // check if the package dependancies changed, if so, re-publish + if me.forge.FinalGoDepsCheckOk(check) { + log.Printf("go.sum is perfect! %s\n", check.GetGoPath()) + continue + } + log.Printf("dependancy checks indicate a new release is needed for %s\n", check.GetGoPath()) + // if v1.2.3 change to v.1.2.4 + check.IncrementTargetRevision() + // run go-mod-clean in each repo that needs to be updated + if master == lastTag { + // 'git notes' has something in it. clear it out + check.Run([]string{"git", "notes", "remove"}) + } + if !runGoClean(check) { + log.Info("go-mod-clean FAILED. THIS IS BAD.", check.GoPath) } }