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: build:
echo "build it!" echo "build it!"
-rm resources/*.so
cp -a ~/go/src/go.wit.com/toolkits/*.so resources/
GO111MODULE=off go build -v -x -ldflags " \ GO111MODULE=off go build -v -x -ldflags " \
-X main.VERSION=${VERSION}" -X main.VERSION=${VERSION}"
install: install:
rm -f ~/go/src/go.wit.com/toolkits/*.so
go install -v -x go install -v -x
guireleaser guireleaser

View File

@ -2,6 +2,7 @@ package main
import ( import (
"os" "os"
"strings"
"go.wit.com/gui" "go.wit.com/gui"
"go.wit.com/lib/debugger" "go.wit.com/lib/debugger"
@ -119,7 +120,8 @@ func globalDisplayOptions(box *gui.Node) {
// unless go.sum depends on changed repos // unless go.sum depends on changed repos
if targetv != lasttag { if targetv != lasttag {
log.Info(repo.GoPath(), "trigger a new release?", 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 continue
@ -146,6 +148,30 @@ func globalDisplayOptions(box *gui.Node) {
incrementTags.SetText("maybe ready?") incrementTags.SetText("maybe ready?")
me.Enable() 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() grid.NextRow()
group2 := vbox.NewGroup("Debugger") group2 := vbox.NewGroup("Debugger")

21
main.go
View File

@ -1,7 +1,6 @@
package main package main
import ( import (
"embed"
"os" "os"
"path/filepath" "path/filepath"
@ -12,23 +11,13 @@ import (
var VERSION string 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() { func main() {
me = new(autoType) me = new(autoType)
// TODO: autocompute these in the gui // save the ENV var here
releaseReasonS = os.Getenv("GUIRELEASE_REASON") me.releaseReasonS = os.Getenv("GUIRELEASE_REASON")
releaseVersion = os.Getenv("GUIRELEASE_VERSION")
widgetVersion = os.Getenv("GUIRELEASE_WIDGET")
if releaseVersion == "" { if me.releaseReasonS == "" {
log.Info("GUIRELEASE_VERSION not set") log.Info("GUIRELEASE_VERSION not set")
os.Exit(0) os.Exit(0)
} }
@ -39,7 +28,6 @@ func main() {
os.Unsetenv("GO111MODULE") os.Unsetenv("GO111MODULE")
me.myGui = gui.New() me.myGui = gui.New()
me.myGui.InitEmbed(resToolkit)
me.myGui.Default() me.myGui.Default()
// our main window // our main window
@ -66,9 +54,6 @@ func main() {
os.Exit(0) os.Exit(0)
} }
// save the ENV var here
me.releaseReasonS = releaseReasonS
log.Info("Creating the Release Window") log.Info("Creating the Release Window")
// initialize the repo list window // initialize the repo list window

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 package main
import ( import (
"os"
"strings" "strings"
"go.wit.com/log" "go.wit.com/log"
@ -28,9 +29,9 @@ func setTargetVersion() {
} }
if repo.GoPath() == "go.wit.com/widget" { if repo.GoPath() == "go.wit.com/widget" {
repo.Status.SetTargetVersion("v" + widgetVersion) repo.Status.SetTargetVersion("v" + os.Getenv("GUIRELEASE_WIDGET"))
} else { } else {
prefix := "v" + releaseVersion prefix := "v" + os.Getenv("GUIRELEASE_VERSION")
lasttag := repo.Status.LastTag() lasttag := repo.Status.LastTag()
if strings.HasPrefix(lasttag, prefix) { if strings.HasPrefix(lasttag, prefix) {
repo.Status.SetTargetVersion(lasttag) repo.Status.SetTargetVersion(lasttag)