diff --git a/Makefile b/Makefile index 5c74f72..82815d9 100644 --- a/Makefile +++ b/Makefile @@ -14,13 +14,10 @@ goimports: build: echo "build it!" - -rm resources/*.so - cp -a ~/go/src/go.wit.com/toolkits/*.so resources/ GO111MODULE=off go build -v -x -ldflags " \ -X main.VERSION=${VERSION}" install: - rm -f ~/go/src/go.wit.com/toolkits/*.so go install -v -x guireleaser diff --git a/globalDisplayOptions.go b/globalDisplayOptions.go index 055f0ab..0e468a3 100644 --- a/globalDisplayOptions.go +++ b/globalDisplayOptions.go @@ -2,6 +2,7 @@ package main import ( "os" + "strings" "go.wit.com/gui" "go.wit.com/lib/debugger" @@ -119,7 +120,8 @@ func globalDisplayOptions(box *gui.Node) { // unless go.sum depends on changed repos if targetv != lasttag { log.Info(repo.GoPath(), "trigger a new release?", targetv, lasttag) - repo.Status.SetVersion("0", "21", "0", releaseReasonS) + // repo.Status.SetVersion("0", "21", "0", me.releaseReasonS) + repo.Status.IncrementMinorVersion(me.releaseReasonS) } continue @@ -146,6 +148,30 @@ func globalDisplayOptions(box *gui.Node) { incrementTags.SetText("maybe ready?") me.Enable() }) + grid.NewButton("increment minor version", func() { + for _, repo := range me.repos.View.AllRepos() { + if whitelist(repo.GoPath()) { + continue + } + if repo.ReadOnly() { + continue + } + if strings.HasPrefix(repo.GoPath(), "go.wit.com/dev") { + continue + } + if strings.HasPrefix(repo.GoPath(), "go.wit.com/widget") { + // widget I versioned early before I knew what the hell this would mean and can + // not be down versioned because that's not how GO versioning works. Once you + // set the version for a path, it's set in stone forever. (smart system!) + // we could rename go.wit.com/widget to go.wit.com/newwidget and restart the versioning + // system, but that's rediculous and this servers to always remind me to never make this mistake again + repo.Status.IncrementRevisionVersion("trying minor") + continue + } + // repo.Status.SetVersion("0", "22", "0", "trying increment minor") + repo.Status.IncrementMinorVersion("trying minor") + } + }) grid.NextRow() group2 := vbox.NewGroup("Debugger") diff --git a/hideFunction.go b/hideFunction.go index 5bf3feb..2feac4d 100644 --- a/hideFunction.go +++ b/hideFunction.go @@ -21,10 +21,10 @@ func hideFunction(r *repolist.RepoRow) { } // always show repos that have not been merged ? -// if r.GoState() == "merge to devel" { -// r.Show() -// return -// } + // if r.GoState() == "merge to devel" { + // r.Show() + // return + // } // hide read-only repos if os.Getenv("AUTOTYPIST_READONLY") == "hide" { diff --git a/main.go b/main.go index fd1d091..2d261dd 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,6 @@ package main import ( - "embed" "os" "path/filepath" @@ -12,23 +11,13 @@ import ( var VERSION string -// TODO: autocompute these in the gui -var releaseReasonS string -var releaseVersion string -var widgetVersion string - -//go:embed resources/* -var resToolkit embed.FS - func main() { me = new(autoType) - // TODO: autocompute these in the gui - releaseReasonS = os.Getenv("GUIRELEASE_REASON") - releaseVersion = os.Getenv("GUIRELEASE_VERSION") - widgetVersion = os.Getenv("GUIRELEASE_WIDGET") + // save the ENV var here + me.releaseReasonS = os.Getenv("GUIRELEASE_REASON") - if releaseVersion == "" { + if me.releaseReasonS == "" { log.Info("GUIRELEASE_VERSION not set") os.Exit(0) } @@ -39,7 +28,6 @@ func main() { os.Unsetenv("GO111MODULE") me.myGui = gui.New() - me.myGui.InitEmbed(resToolkit) me.myGui.Default() // our main window @@ -66,9 +54,6 @@ func main() { os.Exit(0) } - // save the ENV var here - me.releaseReasonS = releaseReasonS - log.Info("Creating the Release Window") // initialize the repo list window diff --git a/releaseBox.go b/releaseBox.go index 6188f13..398f782 100644 --- a/releaseBox.go +++ b/releaseBox.go @@ -16,16 +16,16 @@ import ( ) type releaseStruct struct { - box *gui.Node - group *gui.Node - grid *gui.Node - repo *gadgets.OneLiner - status *gadgets.OneLiner - readOnly *gadgets.OneLiner - notes *gadgets.OneLiner - version *gadgets.OneLiner + box *gui.Node + group *gui.Node + grid *gui.Node + repo *gadgets.OneLiner + status *gadgets.OneLiner + readOnly *gadgets.OneLiner + notes *gadgets.OneLiner + version *gadgets.OneLiner releaseVersionB *gui.Node - reason *gadgets.BasicEntry + reason *gadgets.BasicEntry openrepo *gui.Node diff --git a/resources/myrepolist b/resources/myrepolist deleted file mode 100644 index 6bf06c7..0000000 --- a/resources/myrepolist +++ /dev/null @@ -1,15 +0,0 @@ -go.wit.com/log - -go.wit.com/gui/widget -go.wit.com/gui/gui -go.wit.com/gui/toolkits -go.wit.com/gui/debugger - -go.wit.com/gui/gadgets -go.wit.com/gui/gadgets/repostatus -go.wit.com/gui/digitalocean -go.wit.com/gui/cloudflare - -go.wit.com/apps/control-panel-dns -go.wit.com/apps/control-panel-vpn -go.wit.com/apps/autotypist diff --git a/setTargetVersion.go b/setTargetVersion.go index 53d0abc..017649f 100644 --- a/setTargetVersion.go +++ b/setTargetVersion.go @@ -1,6 +1,7 @@ package main import ( + "os" "strings" "go.wit.com/log" @@ -28,9 +29,9 @@ func setTargetVersion() { } if repo.GoPath() == "go.wit.com/widget" { - repo.Status.SetTargetVersion("v" + widgetVersion) + repo.Status.SetTargetVersion("v" + os.Getenv("GUIRELEASE_WIDGET")) } else { - prefix := "v" + releaseVersion + prefix := "v" + os.Getenv("GUIRELEASE_VERSION") lasttag := repo.Status.LastTag() if strings.HasPrefix(lasttag, prefix) { repo.Status.SetTargetVersion(lasttag)