worked pretty well last release

This commit is contained in:
Jeff Carr 2025-01-28 11:36:06 -06:00
parent 0ec680f2c3
commit 2d118d3ae7
5 changed files with 19 additions and 66 deletions

View File

@ -198,6 +198,8 @@ func doRelease() bool {
// run this each time something gets published successfully
rePrepareRelease()
findNext()
// attempt to find another repo to release
if !doReleaseFindNext() {
log.Info("doReleaseFindNext() could not find a new", findCounter)
@ -233,9 +235,10 @@ func doReleaseFindNext() bool {
log.Info("boo, you didn't git clone", me.current.GetGoPath())
return false
}
if findFix {
fixGodeps(check)
}
// took this out 2025-01-20. things were working perfectly before this
// if findFix {
// fixGodeps(check)
// }
if me.forge.FinalGoDepsCheckOk(check, false) {
// the go.sum file is ok to release
return true

View File

@ -132,17 +132,6 @@ func findNext() bool {
log.Info("findNext() skipping dirty")
continue
}
/*
if findFix {
log.Info("findFix is true. running fixGoDeps()")
if fixGodeps(check) {
log.Info("fixGoDeps() returned true")
} else {
log.Info("fixGoDeps() returned false")
}
}
*/
findCounter += 1
if !check.ParseGoSum() {
log.Info("ParseGoSum() failed")

View File

@ -28,7 +28,7 @@ func globalDisplayOptions(box *gui.Node) {
grid := group1.RawGrid()
grid.NewButton("make prepare-release", func() {
makePrepareRelease()
rePrepareRelease()
})
grid.NextRow()

14
main.go
View File

@ -119,8 +119,18 @@ func main() {
}
me.Enable()
// set all branches to master & findNext()
makePrepareRelease()
// run this each time something gets published successfully
rePrepareRelease()
if findNext() {
log.Info("prepare release findNext() returned true")
} else {
// check if nothing is found an exit?
if me.found.Len() == 0 {
log.Info("nothing found to publish")
os.Exit(0)
}
}
// intermittently scans the status indefinitly
me.repos.View.Watchdog(func() {

View File

@ -10,21 +10,6 @@ import (
"go.wit.com/log"
)
func makePrepareRelease() {
me.Disable()
me.release.box.Disable()
defer me.Enable()
// run this each time something gets published successfully
rePrepareRelease()
if findNext() {
log.Info("prepare release findNext() returned true")
}
me.release.box.Enable()
}
func forceReleaseVersion(repo *gitpb.Repo) {
if argv.Minor {
// if v1.2.3 change to v.1.3.0
@ -38,40 +23,6 @@ func forceReleaseVersion(repo *gitpb.Repo) {
os.Exit(-1)
}
}
/*
// empty git notes
if _, err := repo.RunVerboseOnError([]string{"go-mod-clean", "--purge"}); err != nil {
// log.Info("probably you don't have gomodclean")
// log.Info(strings.Join(result.Stdout, "\n"))
// log.Info(strings.Join(result.Stderr, "\n"))
// repo.Run([]string{"git", "notes", "remove"})
os.Exit(-1)
}
if !runGoClean(repo, "--restore") {
log.Info("gomodclean probably failed here. that's ok", repo.GetGoPath())
// os.Exit(-1)
}
*/
}
func rillGoModRestore(repo *gitpb.Repo) error {
/*
if repo.GetTargetVersion() == "" {
// not set to upgrade
return nil
}
if repo.GetLastTag() == repo.GetTargetVersion() {
return nil
}
*/
if me.forge.Config.IsReadOnly(repo.GetGoPath()) {
return nil
}
if me.forge.Config.IsPrivate(repo.GetGoPath()) {
return nil
}
runGoClean(repo, "--restore")
return nil
}
func rePrepareRelease() {