testing automation

This commit is contained in:
Jeff Carr 2024-12-10 01:47:45 -06:00
parent dcf18c2b7a
commit 20b3fa3520
2 changed files with 29 additions and 2 deletions

View File

@ -1,7 +1,7 @@
VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d)
all: build
all: goimports build
goimports:
goimports -w *.go
@ -19,7 +19,7 @@ build:
GO111MODULE=off go build \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
install:
install: goimports
-rm resources/*.so
cp -a ~/go/src/go.wit.com/toolkits/*/*.so resources/
GO111MODULE=off go install \

View File

@ -154,6 +154,33 @@ func createReleaseBox(box *gui.Node) {
}
second := findCounter
log.Info("doReleaseAll() first =", first, "second =", second)
if first == 0 {
log.Info("doReleaseAll() first is 0. everything is done")
log.Info("os.Exit(0) here safely")
buttonEnable()
return
}
if first != second {
log.Info("doReleaseAll() first second do not match. findNext()")
findNext()
ok, duration := doReleaseAll()
s := fmt.Sprint(duration)
log.Info("release returned", ok, "and ran for", s, "findCounter =", findCounter)
third := findCounter
log.Info("doReleaseAll() first =", first, "second =", second, "third =", third)
} else {
log.Info("doReleaseAll() first second match. something has gone terribly wrong")
log.Info("killing guireleaser is a bad idea here. it will potentially loose state")
log.Info("the only way now is to parse 'go list' or ~/go/pkg/mod/<gopath>/go.sum files")
log.Info("to determine the last known version to make sure everything is redone correctly")
log.Info("this is the worst case. the better idea is to make sure it never fails")
log.Info("and restarts correctly where it left off. That might not be possible?")
log.Info("because 'go get @foo.com/bar@latest' appears to be global and so")
log.Info("some go.sum files might be correct when some are not actually published")
log.Info("TODO: is this true or not?")
}
buttonEnable()
})
grid.NextRow()