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()
|
||||
lastS := release.current.status.GetLastTagVersion()
|
||||
currentS := release.current.status.GetCurrentBranchVersion()
|
||||
|
||||
targetS := "v" + release.versionS
|
||||
log.Info("repo:", release.current.String(), goSumS, dirtyS, lastS, currentS)
|
||||
|
||||
if goSumS == "PRIMATIVE" {
|
||||
return true
|
||||
}
|
||||
if goSumS == "RELEASED" {
|
||||
return true
|
||||
}
|
||||
if goSumS == "UNCHANGED" {
|
||||
return true
|
||||
}
|
||||
if goSumS == "READY" {
|
||||
if release.versionS == lastS {
|
||||
if targetS == lastS {
|
||||
release.current.setGoSumStatus("RELEASED")
|
||||
return true
|
||||
}
|
||||
if lastS == currentS {
|
||||
release.current.setGoSumStatus("DONE")
|
||||
release.current.setGoSumStatus("UNCHANGED")
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
@ -54,13 +63,13 @@ func CheckReady() bool {
|
|||
return false
|
||||
}
|
||||
|
||||
if release.versionS == lastS {
|
||||
log.Info("\trepo is already done", lastS, "=", release.versionS)
|
||||
if targetS == lastS {
|
||||
log.Info("\trepo is already done", lastS, "=", targetS)
|
||||
release.current.setGoSumStatus("READY")
|
||||
return true
|
||||
}
|
||||
if lastS == currentS {
|
||||
log.Info("\trepo is already done", lastS, "=", release.versionS)
|
||||
log.Info("\trepo is already done", lastS, "=", targetS)
|
||||
release.current.setGoSumStatus("READY")
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -54,8 +54,8 @@ func (w *autoType) Enable() {
|
|||
}
|
||||
|
||||
func createReleaseBox(box *gui.Node) {
|
||||
release.versionS = "0.17.0"
|
||||
release.reasonS = "gocui"
|
||||
release.versionS = "0.18.0"
|
||||
release.reasonS = "dns control panel"
|
||||
partS := strings.Split(release.versionS, ".")
|
||||
|
||||
initWhitelist()
|
||||
|
@ -83,7 +83,6 @@ func createReleaseBox(box *gui.Node) {
|
|||
})
|
||||
release.grid.NewButton("release version "+release.versionS, func() {
|
||||
buttonDisable()
|
||||
defer buttonEnable()
|
||||
|
||||
if release.current.status.CheckDirty() {
|
||||
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)
|
||||
|
||||
release.current.status.RunCmd([]string{"git", "add", "-f", "go.mod"})
|
||||
release.current.status.RunCmd([]string{"git", "add", "-f", "go.sum"})
|
||||
release.current.status.RunCmd([]string{"git", "commit", "-m", release.reasonS})
|
||||
release.current.status.RunCmd([]string{"git", "push"})
|
||||
release.current.status.RunCmd([]string{"git", "tag", "-m", release.reasonS, "v" + release.versionS})
|
||||
release.current.status.RunCmd([]string{"git", "push", "origin", "v" + release.versionS})
|
||||
var all [][]string
|
||||
all = append(all, []string{"git", "add", "-f", "go.mod"})
|
||||
all = append(all, []string{"git", "add", "-f", "go.sum"})
|
||||
all = append(all, []string{"git", "commit", "-m", release.reasonS})
|
||||
all = append(all, []string{"git", "push"})
|
||||
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() {
|
||||
|
@ -210,9 +218,15 @@ func createReleaseBox(box *gui.Node) {
|
|||
})
|
||||
*/
|
||||
|
||||
release.checkSafeB = release.grid.NewButton("checkSafeGoSumRemake()", func() {
|
||||
release.checkSafeB = release.grid.NewButton("CheckSafeGoSumRemake()", func() {
|
||||
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()
|
||||
})
|
||||
release.checkGoSumB = release.grid.NewButton("CheckGoSum()", func() {
|
||||
|
|
Loading…
Reference in New Issue