compiles again. doesn't work

This commit is contained in:
Jeff Carr 2024-11-29 22:21:58 -06:00
parent 24e942df16
commit f7c9af9537
5 changed files with 9 additions and 56 deletions

View File

@ -14,6 +14,7 @@ vet:
build: build:
echo "build it!" echo "build it!"
-rm resources/*.so -rm resources/*.so
-mkdir resources/
cp -a ~/go/src/go.wit.com/toolkits/*.so resources/ cp -a ~/go/src/go.wit.com/toolkits/*.so resources/
GO111MODULE=off go build \ GO111MODULE=off go build \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
@ -34,6 +35,7 @@ redomod:
rm -f go.* rm -f go.*
GO111MODULE= go mod init GO111MODULE= go mod init
GO111MODULE= go mod tidy GO111MODULE= go mod tidy
go mod edit -go=1.20
curl-help: curl-help:
curl --silent http://localhost:9419/help curl --silent http://localhost:9419/help

View File

@ -34,6 +34,7 @@ func doRelease() bool {
log.Info("go.mod disappeared. need to run go mod init and go mod tidy here:", pwd) log.Info("go.mod disappeared. need to run go mod init and go mod tidy here:", pwd)
shell.RunRealtime([]string{"go", "mod", "init"}) shell.RunRealtime([]string{"go", "mod", "init"})
shell.RunRealtime([]string{"go", "mod", "tidy"}) shell.RunRealtime([]string{"go", "mod", "tidy"})
shell.RunRealtime([]string{"go", "mod", "edit", "-go=1.20"})
} }
curName := me.current.Status.GetCurrentBranchName() curName := me.current.Status.GetCurrentBranchName()
@ -189,7 +190,7 @@ func doPublishVersion() bool {
log.Info("go get must be run from somewhere else other than guireleaser") log.Info("go get must be run from somewhere else other than guireleaser")
log.Info("chdir to autotypist if it exists") log.Info("chdir to autotypist if it exists")
if shell.Exists("/home/jcarr/go/src/go.wit.com/apps/autotypist") { if shell.Exists("/home/jcarr/go/src/go.wit.com/apps/autotypist") {
os.Chdir("/home/jcarr/go/src/go.wit.com/apps/autotypist") os.Chdir("/home/jcarr/go/src/go.wit.com/apps/autotypist")
} else { } else {
log.Info("need to chdir somewhere with go.sum & go.mod") log.Info("need to chdir somewhere with go.sum & go.mod")
return false return false

View File

@ -1,35 +0,0 @@
package main
// this initializes the repos
import (
"strings"
"go.wit.com/lib/gui/repostatus"
"go.wit.com/log"
)
func (r *repoWindow) initRepoList() {
r.View.InitRepoList(".config/guireleaser")
log.Info("scanning everything in ~/go/src")
for i, path := range repostatus.ListGitDirectories() {
// log.Info("addRepo()", i, path)
path = strings.TrimPrefix(path, me.goSrcPwd.String())
path = strings.Trim(path, "/")
log.Info("addRepo()", i, path)
r.View.NewRepo(path)
}
}
func (r *repoWindow) tmpRepoList() {
log.Info("scanning everything in ~/go/src")
for i, path := range repostatus.ListGitDirectories() {
// log.Info("addRepo()", i, path)
path = strings.TrimPrefix(path, me.goSrcPwd.String())
path = strings.Trim(path, "/")
log.Info("addRepo()", i, path)
r.View.NewRepo(path)
}
}

19
main.go
View File

@ -9,6 +9,7 @@ import (
"go.wit.com/gui" "go.wit.com/gui"
"go.wit.com/lib/gui/gowit" "go.wit.com/lib/gui/gowit"
"go.wit.com/lib/gui/shell" "go.wit.com/lib/gui/shell"
"go.wit.com/lib/protobuf/forgepb"
"go.wit.com/log" "go.wit.com/log"
) )
@ -23,16 +24,9 @@ func main() {
me = new(autoType) me = new(autoType)
// load the ~/.config/forge/ config // load the ~/.config/forge/ config
if err := me.forge.ConfigLoad(); err != nil { me.forge = forgepb.Init()
log.Warn("forgepb.ConfigLoad() failed", err) me.forge.ConfigPrintTable()
os.Exit(-1) os.Setenv("REPO_WORK_PATH", me.forge.GetGoSrc())
}
// load the ~/.config/forge/ machine file from zoopb
if err := me.machine.ConfigLoad(); err != nil {
log.Warn("zoopb.ConfigLoad() failed", err)
os.Exit(-1)
}
// parse the command line // parse the command line
arg.MustParse(&myargs) arg.MustParse(&myargs)
@ -111,10 +105,6 @@ func main() {
me.release.box.Disable() me.release.box.Disable()
me.Disable() me.Disable()
// parse config file and scan for .git repos
me.repos.initRepoList()
// setTargetVersion()
// register a Show/Hide function for the repo list table // register a Show/Hide function for the repo list table
me.repos.View.RegisterHideFunction(hideFunction) me.repos.View.RegisterHideFunction(hideFunction)
@ -122,7 +112,6 @@ func main() {
// TODO: should not really be necessary directly after init() // TODO: should not really be necessary directly after init()
me.repos.View.ScanRepositories() me.repos.View.ScanRepositories()
loop := me.repos.View.ReposSortByName() loop := me.repos.View.ReposSortByName()
for loop.Scan() { for loop.Scan() {
repo := loop.Repo() repo := loop.Repo()

View File

@ -6,7 +6,6 @@ import (
"go.wit.com/lib/gadgets" "go.wit.com/lib/gadgets"
"go.wit.com/lib/gui/repolist" "go.wit.com/lib/gui/repolist"
"go.wit.com/lib/protobuf/forgepb" "go.wit.com/lib/protobuf/forgepb"
"go.wit.com/lib/protobuf/zoopb"
) )
var me *autoType var me *autoType
@ -29,10 +28,7 @@ type autoType struct {
repos *repoWindow repos *repoWindow
// your customized repo preferences and settings // your customized repo preferences and settings
forge forgepb.Repos forge *forgepb.Forge
// use zookeeper to get the list of installed packages
machine zoopb.Machine
// #### autotypist Global Build Options // #### autotypist Global Build Options
// what to change all the branches to // what to change all the branches to