fix build

This commit is contained in:
Jeff Carr 2024-11-16 00:07:53 -06:00
parent 9cf14144ed
commit cae26ecb18
4 changed files with 28 additions and 44 deletions

View File

@ -1,37 +1,7 @@
VERSION = $(shell git describe --tags) VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d)
all: all: build
@echo to test: 'make test'
@echo open test win: 'make tempWin'
@echo
@echo run this from the autotypist dir:
@echo " GUIRELEASE_REASON=notsure guireleaser"
@echo then:
@echo " make prepare-release"
@echo then:
@echo " make showNext"
@echo " make doRelease"
@echo loop until done
# single: build
# ./guireleaser go.wit.com/apps/go-clone --increment --release --reason "testing guireleaser" --dry-run
# dump:
# ./guireleaser go.wit.com/apps/go-clone --increment --release --reason "testing guireleaser" --dry-run --dump-versions
# single-really-do-it: build
# ./guireleaser go.wit.com/apps/go-clone --increment --release --reason "testing guireleaser"
stderr: build
echo "writing to /tmp/guireleaser.stderr"
./guireleaser >/tmp/guireleaser.stderr 2>&1
prepare-release:
reset
make list-release-notdone
make curl-incrementAllTargetVersions
make list-release-notdone
make curl-whitelist-stuff
make findNext
make showNext
goimports: goimports:
goimports -w *.go goimports -w *.go
@ -45,14 +15,14 @@ build:
echo "build it!" echo "build it!"
-rm resources/*.so -rm resources/*.so
cp -a ~/go/src/go.wit.com/toolkits/*.so resources/ cp -a ~/go/src/go.wit.com/toolkits/*.so resources/
GO111MODULE=off go build -v -x -ldflags " \ GO111MODULE=off go build \
-X main.VERSION=${VERSION}" -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
install: install:
-rm resources/*.so -rm resources/*.so
cp -a ~/go/src/go.wit.com/toolkits/*.so resources/ cp -a ~/go/src/go.wit.com/toolkits/*.so resources/
GO111MODULE=off go install -v -x -ldflags " \ GO111MODULE=off go install \
-X main.VERSION=${VERSION}" -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
test: build test: build
GUIRELEASE_REASON='test build' ./guireleaser GUIRELEASE_REASON='test build' ./guireleaser

View File

@ -115,7 +115,9 @@ func main() {
// find myself. the guireleaser directory is used as a working scratchpad // find myself. the guireleaser directory is used as a working scratchpad
// for running go commands that can mess up the go.* files // for running go commands that can mess up the go.* files
for _, repo := range me.repos.View.AllRepos() { loop := me.repos.View.ReposSortByName()
for loop.Scan() {
repo := loop.Repo()
if repo.GoPath() == "go.wit.com/apps/guireleaser" { if repo.GoPath() == "go.wit.com/apps/guireleaser" {
if me.release.guireleaser == nil { if me.release.guireleaser == nil {
me.release.guireleaser = repo me.release.guireleaser = repo
@ -146,7 +148,9 @@ func main() {
// to the master branch // to the master branch
func setAllBranchesToMaster() bool { func setAllBranchesToMaster() bool {
var worked bool = true var worked bool = true
for _, repo := range me.repos.View.AllRepos() { loop := me.repos.View.ReposSortByName()
for loop.Scan() {
repo := loop.Repo()
if repo.ReadOnly() { if repo.ReadOnly() {
continue continue
} }

View File

@ -143,7 +143,9 @@ func createReleaseBox(box *gui.Node) {
// rather than loop forever, at least limit this to the number of repos // rather than loop forever, at least limit this to the number of repos
// incase something, somewhere, goes wrong // incase something, somewhere, goes wrong
duration := repolist.TimeFunction(func() { duration := repolist.TimeFunction(func() {
for n := 0; n <= len(me.repos.View.AllRepos()); n++ { loop := me.repos.View.ReposSortByName()
for loop.Scan() {
loop.Repo()
if doRelease() { if doRelease() {
log.Info("doRelease() worked") log.Info("doRelease() worked")
} else { } else {
@ -179,7 +181,9 @@ func createReleaseBox(box *gui.Node) {
grid.NextRow() grid.NextRow()
grid.NewButton("git ls-files |grep go.mod", func() { grid.NewButton("git ls-files |grep go.mod", func() {
for _, repo := range me.repos.View.AllRepos() { loop := me.repos.View.ReposSortByName()
for loop.Scan() {
repo := loop.Repo()
log.Info("repo:", repo.Name()) log.Info("repo:", repo.Name())
if repo.Status.ReadOnly() { if repo.Status.ReadOnly() {
continue continue
@ -275,7 +279,9 @@ func setCurrentRepo(newcur *repolist.RepoRow, s string, note string) bool {
// todo: redo this logic as it is terrible // todo: redo this logic as it is terrible
// rename this findNext() // rename this findNext()
func findNext() bool { func findNext() bool {
for _, repo := range me.repos.View.AllRepos() { loop := me.repos.View.ReposSortByName()
for loop.Scan() {
repo := loop.Repo()
if repo.Status.IsReleased() { if repo.Status.IsReleased() {
continue continue
} }

View File

@ -17,9 +17,11 @@ func setTargetVersion() {
// we could rename go.wit.com/widget to go.wit.com/newwidget and restart the versioning // 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 // system, but that's rediculous and this servers to always remind me to never make this mistake again
var count int var count int
for i, repo := range me.repos.View.AllRepos() { loop := me.repos.View.ReposSortByName()
for loop.Scan() {
repo := loop.Repo()
if repo == nil { if repo == nil {
log.Info("initial scan repo = nil", i) log.Info("initial scan repo = nil")
continue continue
} }
@ -52,7 +54,9 @@ func setTargetVersion() {
// trys to figure out if the version needs to be incremented // trys to figure out if the version needs to be incremented
func incrementTargetVersion() bool { func incrementTargetVersion() bool {
var count int var count int
for _, repo := range me.repos.View.AllRepos() { loop := me.repos.View.ReposSortByName()
for loop.Scan() {
repo := loop.Repo()
if repo.ReadOnly() { if repo.ReadOnly() {
continue continue
} }