worked pretty well last release
This commit is contained in:
parent
0ec680f2c3
commit
2d118d3ae7
|
@ -198,6 +198,8 @@ func doRelease() bool {
|
||||||
// run this each time something gets published successfully
|
// run this each time something gets published successfully
|
||||||
rePrepareRelease()
|
rePrepareRelease()
|
||||||
|
|
||||||
|
findNext()
|
||||||
|
|
||||||
// attempt to find another repo to release
|
// attempt to find another repo to release
|
||||||
if !doReleaseFindNext() {
|
if !doReleaseFindNext() {
|
||||||
log.Info("doReleaseFindNext() could not find a new", findCounter)
|
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())
|
log.Info("boo, you didn't git clone", me.current.GetGoPath())
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if findFix {
|
// took this out 2025-01-20. things were working perfectly before this
|
||||||
fixGodeps(check)
|
// if findFix {
|
||||||
}
|
// fixGodeps(check)
|
||||||
|
// }
|
||||||
if me.forge.FinalGoDepsCheckOk(check, false) {
|
if me.forge.FinalGoDepsCheckOk(check, false) {
|
||||||
// the go.sum file is ok to release
|
// the go.sum file is ok to release
|
||||||
return true
|
return true
|
||||||
|
|
11
findNext.go
11
findNext.go
|
@ -132,17 +132,6 @@ func findNext() bool {
|
||||||
log.Info("findNext() skipping dirty")
|
log.Info("findNext() skipping dirty")
|
||||||
continue
|
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
|
findCounter += 1
|
||||||
if !check.ParseGoSum() {
|
if !check.ParseGoSum() {
|
||||||
log.Info("ParseGoSum() failed")
|
log.Info("ParseGoSum() failed")
|
||||||
|
|
|
@ -28,7 +28,7 @@ func globalDisplayOptions(box *gui.Node) {
|
||||||
grid := group1.RawGrid()
|
grid := group1.RawGrid()
|
||||||
|
|
||||||
grid.NewButton("make prepare-release", func() {
|
grid.NewButton("make prepare-release", func() {
|
||||||
makePrepareRelease()
|
rePrepareRelease()
|
||||||
})
|
})
|
||||||
grid.NextRow()
|
grid.NextRow()
|
||||||
|
|
||||||
|
|
14
main.go
14
main.go
|
@ -119,8 +119,18 @@ func main() {
|
||||||
}
|
}
|
||||||
me.Enable()
|
me.Enable()
|
||||||
|
|
||||||
// set all branches to master & findNext()
|
// run this each time something gets published successfully
|
||||||
makePrepareRelease()
|
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
|
// intermittently scans the status indefinitly
|
||||||
me.repos.View.Watchdog(func() {
|
me.repos.View.Watchdog(func() {
|
||||||
|
|
|
@ -10,21 +10,6 @@ import (
|
||||||
"go.wit.com/log"
|
"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) {
|
func forceReleaseVersion(repo *gitpb.Repo) {
|
||||||
if argv.Minor {
|
if argv.Minor {
|
||||||
// if v1.2.3 change to v.1.3.0
|
// if v1.2.3 change to v.1.3.0
|
||||||
|
@ -38,40 +23,6 @@ func forceReleaseVersion(repo *gitpb.Repo) {
|
||||||
os.Exit(-1)
|
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() {
|
func rePrepareRelease() {
|
||||||
|
|
Loading…
Reference in New Issue