jesus. what a slow slog
This commit is contained in:
parent
79ea2eaec1
commit
5447f9ebfe
14
doRelease.go
14
doRelease.go
|
@ -199,10 +199,16 @@ func doRelease() bool {
|
|||
shell.RunRealtime(cmd)
|
||||
me.forge = forgepb.Init()
|
||||
|
||||
// update the values in the GUI
|
||||
if repov := me.repos.View.FindByPath(check.GetGoPath()); repov != nil {
|
||||
repov.NewScan2(check)
|
||||
}
|
||||
// run this each time something gets published successfully
|
||||
rePrepareRelease()
|
||||
|
||||
/*
|
||||
// notsure about this anymore
|
||||
// update the values in the GUI
|
||||
if repov := me.repos.View.FindByPath(check.GetGoPath()); repov != nil {
|
||||
repov.NewScan2(check)
|
||||
}
|
||||
*/
|
||||
|
||||
// attempt to find another repo to release
|
||||
if !doReleaseFindNext() {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"go.wit.com/lib/protobuf/forgepb"
|
||||
"go.wit.com/lib/protobuf/gitpb"
|
||||
"go.wit.com/log"
|
||||
)
|
||||
|
@ -19,6 +20,37 @@ func makePrepareRelease() {
|
|||
log.Info("setAllBranchesToMaster() failed")
|
||||
}
|
||||
|
||||
// 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
|
||||
repo.IncrementTargetMinor()
|
||||
} else {
|
||||
// if v1.2.3 change to v.1.2.4
|
||||
repo.IncrementTargetRevision()
|
||||
}
|
||||
// empty git notes
|
||||
repo.Run([]string{"git", "notes", "remove"})
|
||||
|
||||
if !runGoClean(repo) {
|
||||
log.Info("go-mod-clean probably failed here. that's ok", repo.GetGoPath())
|
||||
}
|
||||
}
|
||||
|
||||
func rePrepareRelease() {
|
||||
// reload the config
|
||||
me.forge = forgepb.Init()
|
||||
me.found = new(gitpb.Repos)
|
||||
|
||||
// blank all the target versions incase they were saved in the config .pb file
|
||||
all := me.forge.Repos.SortByFullPath()
|
||||
for all.Scan() {
|
||||
|
@ -68,32 +100,4 @@ func makePrepareRelease() {
|
|||
|
||||
}
|
||||
me.forge.ConfigSave()
|
||||
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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func forceReleaseVersion(repo *gitpb.Repo) {
|
||||
if argv.Minor {
|
||||
// if v1.2.3 change to v.1.3.0
|
||||
repo.IncrementTargetMinor()
|
||||
} else {
|
||||
// if v1.2.3 change to v.1.2.4
|
||||
repo.IncrementTargetRevision()
|
||||
}
|
||||
// empty git notes
|
||||
repo.Run([]string{"git", "notes", "remove"})
|
||||
|
||||
if !runGoClean(repo) {
|
||||
log.Info("go-mod-clean probably failed here. that's ok", repo.GetGoPath())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue