keep trying to increment versions

This commit is contained in:
Jeff Carr 2024-03-02 20:47:10 -06:00
parent d60a565d88
commit 1a90d070bb
7 changed files with 46 additions and 52 deletions

View File

@ -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

View File

@ -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")

View File

@ -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" {

21
main.go
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)