summaryrefslogtreecommitdiff
path: root/releaseWindow.go
diff options
context:
space:
mode:
Diffstat (limited to 'releaseWindow.go')
-rw-r--r--releaseWindow.go36
1 files changed, 25 insertions, 11 deletions
diff --git a/releaseWindow.go b/releaseWindow.go
index eb780ab..0fb62db 100644
--- a/releaseWindow.go
+++ b/releaseWindow.go
@@ -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() {