jesus. what a slow slog
This commit is contained in:
parent
79ea2eaec1
commit
5447f9ebfe
|
@ -199,10 +199,16 @@ func doRelease() bool {
|
||||||
shell.RunRealtime(cmd)
|
shell.RunRealtime(cmd)
|
||||||
me.forge = forgepb.Init()
|
me.forge = forgepb.Init()
|
||||||
|
|
||||||
|
// run this each time something gets published successfully
|
||||||
|
rePrepareRelease()
|
||||||
|
|
||||||
|
/*
|
||||||
|
// notsure about this anymore
|
||||||
// update the values in the GUI
|
// update the values in the GUI
|
||||||
if repov := me.repos.View.FindByPath(check.GetGoPath()); repov != nil {
|
if repov := me.repos.View.FindByPath(check.GetGoPath()); repov != nil {
|
||||||
repov.NewScan2(check)
|
repov.NewScan2(check)
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// attempt to find another repo to release
|
// attempt to find another repo to release
|
||||||
if !doReleaseFindNext() {
|
if !doReleaseFindNext() {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"go.wit.com/lib/protobuf/forgepb"
|
||||||
"go.wit.com/lib/protobuf/gitpb"
|
"go.wit.com/lib/protobuf/gitpb"
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
)
|
)
|
||||||
|
@ -19,6 +20,37 @@ func makePrepareRelease() {
|
||||||
log.Info("setAllBranchesToMaster() failed")
|
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
|
// blank all the target versions incase they were saved in the config .pb file
|
||||||
all := me.forge.Repos.SortByFullPath()
|
all := me.forge.Repos.SortByFullPath()
|
||||||
for all.Scan() {
|
for all.Scan() {
|
||||||
|
@ -68,32 +100,4 @@ func makePrepareRelease() {
|
||||||
|
|
||||||
}
|
}
|
||||||
me.forge.ConfigSave()
|
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