release versions
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
eea6a138cb
commit
37e1e5a37a
|
@ -34,17 +34,26 @@ func CheckReady() bool {
|
||||||
dirtyS := release.current.dirtyLabel.String()
|
dirtyS := release.current.dirtyLabel.String()
|
||||||
lastS := release.current.status.GetLastTagVersion()
|
lastS := release.current.status.GetLastTagVersion()
|
||||||
currentS := release.current.status.GetCurrentBranchVersion()
|
currentS := release.current.status.GetCurrentBranchVersion()
|
||||||
|
|
||||||
|
targetS := "v" + release.versionS
|
||||||
log.Info("repo:", release.current.String(), goSumS, dirtyS, lastS, currentS)
|
log.Info("repo:", release.current.String(), goSumS, dirtyS, lastS, currentS)
|
||||||
|
|
||||||
if goSumS == "PRIMATIVE" {
|
if goSumS == "PRIMATIVE" {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
if goSumS == "RELEASED" {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if goSumS == "UNCHANGED" {
|
||||||
|
return true
|
||||||
|
}
|
||||||
if goSumS == "READY" {
|
if goSumS == "READY" {
|
||||||
if release.versionS == lastS {
|
if targetS == lastS {
|
||||||
release.current.setGoSumStatus("RELEASED")
|
release.current.setGoSumStatus("RELEASED")
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
if lastS == currentS {
|
if lastS == currentS {
|
||||||
release.current.setGoSumStatus("DONE")
|
release.current.setGoSumStatus("UNCHANGED")
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -54,13 +63,13 @@ func CheckReady() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if release.versionS == lastS {
|
if targetS == lastS {
|
||||||
log.Info("\trepo is already done", lastS, "=", release.versionS)
|
log.Info("\trepo is already done", lastS, "=", targetS)
|
||||||
release.current.setGoSumStatus("READY")
|
release.current.setGoSumStatus("READY")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if lastS == currentS {
|
if lastS == currentS {
|
||||||
log.Info("\trepo is already done", lastS, "=", release.versionS)
|
log.Info("\trepo is already done", lastS, "=", targetS)
|
||||||
release.current.setGoSumStatus("READY")
|
release.current.setGoSumStatus("READY")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,8 +54,8 @@ func (w *autoType) Enable() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func createReleaseBox(box *gui.Node) {
|
func createReleaseBox(box *gui.Node) {
|
||||||
release.versionS = "0.17.0"
|
release.versionS = "0.18.0"
|
||||||
release.reasonS = "gocui"
|
release.reasonS = "dns control panel"
|
||||||
partS := strings.Split(release.versionS, ".")
|
partS := strings.Split(release.versionS, ".")
|
||||||
|
|
||||||
initWhitelist()
|
initWhitelist()
|
||||||
|
@ -83,7 +83,6 @@ func createReleaseBox(box *gui.Node) {
|
||||||
})
|
})
|
||||||
release.grid.NewButton("release version "+release.versionS, func() {
|
release.grid.NewButton("release version "+release.versionS, func() {
|
||||||
buttonDisable()
|
buttonDisable()
|
||||||
defer buttonEnable()
|
|
||||||
|
|
||||||
if release.current.status.CheckDirty() {
|
if release.current.status.CheckDirty() {
|
||||||
log.Info("sorry, it's still dirty")
|
log.Info("sorry, it's still dirty")
|
||||||
|
@ -99,12 +98,21 @@ func createReleaseBox(box *gui.Node) {
|
||||||
|
|
||||||
log.Info("\ttag and push", curName, release.versionS, release.reasonS)
|
log.Info("\ttag and push", curName, release.versionS, release.reasonS)
|
||||||
|
|
||||||
release.current.status.RunCmd([]string{"git", "add", "-f", "go.mod"})
|
var all [][]string
|
||||||
release.current.status.RunCmd([]string{"git", "add", "-f", "go.sum"})
|
all = append(all, []string{"git", "add", "-f", "go.mod"})
|
||||||
release.current.status.RunCmd([]string{"git", "commit", "-m", release.reasonS})
|
all = append(all, []string{"git", "add", "-f", "go.sum"})
|
||||||
release.current.status.RunCmd([]string{"git", "push"})
|
all = append(all, []string{"git", "commit", "-m", release.reasonS})
|
||||||
release.current.status.RunCmd([]string{"git", "tag", "-m", release.reasonS, "v" + release.versionS})
|
all = append(all, []string{"git", "push"})
|
||||||
release.current.status.RunCmd([]string{"git", "push", "origin", "v" + release.versionS})
|
all = append(all, []string{"git", "tag", "-m", release.reasonS, "v" + release.versionS})
|
||||||
|
all = append(all, []string{"git", "push", "origin", "v" + release.versionS})
|
||||||
|
|
||||||
|
if doAll(release.current, all) {
|
||||||
|
log.Info("EVERYTHING OK")
|
||||||
|
release.current.setGoSumStatus("RELEASED")
|
||||||
|
buttonEnable()
|
||||||
|
} else {
|
||||||
|
log.Info("SOMETHING FAILED")
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
release.openrepo = release.grid.NewButton("open repo", func() {
|
release.openrepo = release.grid.NewButton("open repo", func() {
|
||||||
|
@ -210,9 +218,15 @@ func createReleaseBox(box *gui.Node) {
|
||||||
})
|
})
|
||||||
*/
|
*/
|
||||||
|
|
||||||
release.checkSafeB = release.grid.NewButton("checkSafeGoSumRemake()", func() {
|
release.checkSafeB = release.grid.NewButton("CheckSafeGoSumRemake()", func() {
|
||||||
buttonDisable()
|
buttonDisable()
|
||||||
release.current.checkSafeGoSumRemake()
|
release.current.status.CheckSafeGoSumRemake()
|
||||||
|
release.current.status.MakeRedomod()
|
||||||
|
if ok, _ := release.current.status.CheckGoSum(); ok {
|
||||||
|
log.Info("repo has go.sum requirements that are clean")
|
||||||
|
} else {
|
||||||
|
log.Info("repo go.sum FAILED")
|
||||||
|
}
|
||||||
buttonEnable()
|
buttonEnable()
|
||||||
})
|
})
|
||||||
release.checkGoSumB = release.grid.NewButton("CheckGoSum()", func() {
|
release.checkGoSumB = release.grid.NewButton("CheckGoSum()", func() {
|
||||||
|
|
Loading…
Reference in New Issue