more release automation
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
386125826f
commit
6d8a49d432
43
draw.go
43
draw.go
|
@ -143,6 +143,37 @@ func (rs *RepoStatus) SetGoSumStatus(s string) {
|
||||||
rs.goSumStatus.SetText(s)
|
rs.goSumStatus.SetText(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (rs *RepoStatus) runDevelMergeB() bool {
|
||||||
|
master := rs.mainWorkingName.String()
|
||||||
|
log.Warn("runDevelMergeB() checking out master branch", master)
|
||||||
|
rs.checkoutBranch("master", master)
|
||||||
|
if rs.getCurrentBranchName() != master {
|
||||||
|
log.Warn("runDevelMergeB() something went wrong switching to the master branch. full stop!")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
log.Warn("runDevelMergeB() running runGitCommands()")
|
||||||
|
if !rs.runGitCommands(true) {
|
||||||
|
log.Warn("runDevelMergeB() SOMETHING WENT WRONG")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
rs.Update()
|
||||||
|
log.Warn("runDevelMergeB() THINGS SEEM OK runGitCommands() returned true.")
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rs *RepoStatus) runFullAutomation() bool {
|
||||||
|
if ! rs.runDevelMergeB() {
|
||||||
|
log.Warn("THINGS FAILED returned false")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
log.Warn("THINGS SEEM OK returned true. can run this again?")
|
||||||
|
log.Warn("develMerge =", rs.develMerge.String())
|
||||||
|
if rs.develMerge.String() == "ready to release" {
|
||||||
|
log.Warn("THINGS SEEM OK ready to release")
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
func (rs *RepoStatus) drawGitCommands() {
|
func (rs *RepoStatus) drawGitCommands() {
|
||||||
rs.gitCommandsGroup = rs.window.Box().NewGroup("git commands")
|
rs.gitCommandsGroup = rs.window.Box().NewGroup("git commands")
|
||||||
newgrid := rs.gitCommandsGroup.NewGrid("gridnuts", 2, 2)
|
newgrid := rs.gitCommandsGroup.NewGrid("gridnuts", 2, 2)
|
||||||
|
@ -184,6 +215,15 @@ func (rs *RepoStatus) drawGitCommands() {
|
||||||
|
|
||||||
label := "merge " + rs.mainWorkingName.String() + " to devel"
|
label := "merge " + rs.mainWorkingName.String() + " to devel"
|
||||||
rs.develMerge = newgrid.NewButton(label, func() {
|
rs.develMerge = newgrid.NewButton(label, func() {
|
||||||
|
rs.Disable()
|
||||||
|
if rs.runFullAutomation() {
|
||||||
|
log.Warn("THINGS SEEM OK fullAutomation() returned true.")
|
||||||
|
} else {
|
||||||
|
log.Warn("THINGS FAILED fullAutomation() returned false")
|
||||||
|
}
|
||||||
|
rs.Enable()
|
||||||
|
|
||||||
|
/*
|
||||||
rs.Disable()
|
rs.Disable()
|
||||||
master := rs.mainWorkingName.String()
|
master := rs.mainWorkingName.String()
|
||||||
log.Warn("develMerge() checking out master branch", master)
|
log.Warn("develMerge() checking out master branch", master)
|
||||||
|
@ -199,7 +239,8 @@ func (rs *RepoStatus) drawGitCommands() {
|
||||||
}
|
}
|
||||||
rs.Update()
|
rs.Update()
|
||||||
rs.Enable()
|
rs.Enable()
|
||||||
log.Warn("THINGS SEEM OK")
|
log.Warn("THINGS SEEM OK runGitCommands() returned true")
|
||||||
|
*/
|
||||||
})
|
})
|
||||||
|
|
||||||
rs.releaseVersion = newgrid.NewButton("tag and release new version", func() {
|
rs.releaseVersion = newgrid.NewButton("tag and release new version", func() {
|
||||||
|
|
|
@ -357,12 +357,16 @@ func (rs *RepoStatus) CheckSafeGoSumRemake() (bool, []string) {
|
||||||
case "SAFE":
|
case "SAFE":
|
||||||
log.Log(WARN, " USER VERSIONS MISMATCH", version, userversion)
|
log.Log(WARN, " USER VERSIONS MISMATCH", version, userversion)
|
||||||
log.Log(WARN, " IGNORE SAFE REPO")
|
log.Log(WARN, " IGNORE SAFE REPO")
|
||||||
|
err, output := rs.RunCmd([]string{"go", "get", depname + "@" + userversion})
|
||||||
|
log.Log(WARN, " go get", depname, err, output)
|
||||||
case "CLEAN":
|
case "CLEAN":
|
||||||
log.Log(WARN, " USER VERSIONS MISMATCH", version, userversion)
|
log.Log(WARN, " USER VERSIONS MISMATCH", version, userversion)
|
||||||
log.Log(WARN, " IGNORE CLEAN REPO")
|
log.Log(WARN, " IGNORE CLEAN REPO")
|
||||||
case "PRIMATIVE":
|
case "PRIMATIVE":
|
||||||
log.Log(WARN, " USER VERSIONS MISMATCH", version, userversion)
|
log.Log(WARN, " USER VERSIONS MISMATCH", version, userversion)
|
||||||
log.Log(WARN, " IGNORE PRIMATIVE REPO")
|
log.Log(WARN, " IGNORE PRIMATIVE REPO")
|
||||||
|
err, output := rs.RunCmd([]string{"go", "get", depname + "@" + userversion})
|
||||||
|
log.Log(WARN, " go get", depname, err, output)
|
||||||
default:
|
default:
|
||||||
log.Log(WARN, " USER VERSIONS MISMATCH", version, userversion)
|
log.Log(WARN, " USER VERSIONS MISMATCH", version, userversion)
|
||||||
clean = append(clean, deprs.String())
|
clean = append(clean, deprs.String())
|
||||||
|
|
8
go.mod
8
go.mod
|
@ -3,10 +3,10 @@ module go.wit.com/lib/gui/repostatus
|
||||||
go 1.21.4
|
go 1.21.4
|
||||||
|
|
||||||
require (
|
require (
|
||||||
go.wit.com/gui v0.13.13
|
go.wit.com/gui v0.13.14
|
||||||
go.wit.com/lib/gadgets v0.13.13
|
go.wit.com/lib/gadgets v0.13.16
|
||||||
go.wit.com/log v0.5.6
|
go.wit.com/log v0.13.0
|
||||||
go.wit.com/widget v1.1.7
|
go.wit.com/widget v1.1.8
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
|
16
go.sum
16
go.sum
|
@ -4,11 +4,11 @@ go.wit.com/dev/alexflint/scalar v1.2.1 h1:loXOcbVnd+8YeJRLey+XXidecBiedMDO00zQ26
|
||||||
go.wit.com/dev/alexflint/scalar v1.2.1/go.mod h1:+rYsfxqdI2cwA8kJ7GCMwWbNJvfvWUurOCXLiwdTtSs=
|
go.wit.com/dev/alexflint/scalar v1.2.1/go.mod h1:+rYsfxqdI2cwA8kJ7GCMwWbNJvfvWUurOCXLiwdTtSs=
|
||||||
go.wit.com/dev/davecgh/spew v1.1.4 h1:C9hj/rjlUpdK+E6aroyLjCbS5MFcyNUOuP1ICLWdNek=
|
go.wit.com/dev/davecgh/spew v1.1.4 h1:C9hj/rjlUpdK+E6aroyLjCbS5MFcyNUOuP1ICLWdNek=
|
||||||
go.wit.com/dev/davecgh/spew v1.1.4/go.mod h1:sihvWmnQ/09FWplnEmozt90CCVqBtGuPXM811tgfhFA=
|
go.wit.com/dev/davecgh/spew v1.1.4/go.mod h1:sihvWmnQ/09FWplnEmozt90CCVqBtGuPXM811tgfhFA=
|
||||||
go.wit.com/gui v0.13.13 h1:rIaEIYol92gHbP/JkJCmFdzo7u5Bc3WoqBA3hwttL6o=
|
go.wit.com/gui v0.13.14 h1:tJMCtZ8fJNmNB7oq4GQkciTA5aKUYlHL7U2tULIzwKU=
|
||||||
go.wit.com/gui v0.13.13/go.mod h1:xdCB1u4UqyaijwZnDdO9510nBlbf4Cdgfsd+R7VtUDo=
|
go.wit.com/gui v0.13.14/go.mod h1:mrITA5sK/wdrUKP33B1cJ8IJ7WGda9iGHEFmxPhxGCE=
|
||||||
go.wit.com/lib/gadgets v0.13.13 h1:pyAvyPKHuLJt4QW8+D3SfNpSF7YR8i0sBQPtLwSvZlc=
|
go.wit.com/lib/gadgets v0.13.16 h1:ljW/hL+9jmndGs6ctDugqyTE6xOxmUlL5PcCw5pL+GQ=
|
||||||
go.wit.com/lib/gadgets v0.13.13/go.mod h1:6uIhec8M5XAzaoHhNBaGpglY/bFJC5PY9KIqZ1R/LJ0=
|
go.wit.com/lib/gadgets v0.13.16/go.mod h1:5DHlhVpm09nfO0ZdwlfrMQt/6d+qm8c5ysR2ghT99/o=
|
||||||
go.wit.com/log v0.5.6 h1:rDC3ju95zfEads4f1Zm+QMkqjZ39CsYAT/UmQQs7VP4=
|
go.wit.com/log v0.13.0 h1:0vyW3mHwDww3wCsyGnmQuX2P4V7aBMoJgxCy0GfA20g=
|
||||||
go.wit.com/log v0.5.6/go.mod h1:BaJBfHFqcJSJLXGQ9RHi3XVhPgsStxSMZRlaRxW4kAo=
|
go.wit.com/log v0.13.0/go.mod h1:BaJBfHFqcJSJLXGQ9RHi3XVhPgsStxSMZRlaRxW4kAo=
|
||||||
go.wit.com/widget v1.1.7 h1:Gy84I2bD8CMna7NcKBX4sRLR8do6x6mVYX0Ui43f3is=
|
go.wit.com/widget v1.1.8 h1:5cHcmfgwCyHjf02Af/9UMrbLhBR7Z/LFAjPuCx4dx5A=
|
||||||
go.wit.com/widget v1.1.7/go.mod h1:I8tnD3x3ECbB/CRNnLCdC+uoyk7rK0AEkzK1bQYSqoQ=
|
go.wit.com/widget v1.1.8/go.mod h1:I8tnD3x3ECbB/CRNnLCdC+uoyk7rK0AEkzK1bQYSqoQ=
|
||||||
|
|
Loading…
Reference in New Issue