From 8cc86a91cb6408fe1380b904c86162e931936a4f Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 20 Feb 2024 16:11:00 -0600 Subject: guirelease finally does a single package again after a week of recoding, fixing and improving the original code, it was able to find a primitive package (toolkits/debian) and update it correctly --- main.go | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 5f0068a..675127f 100644 --- a/main.go +++ b/main.go @@ -74,9 +74,6 @@ func main() { // which should be all the git repositories in ~/go/src & the .config file me.repos = makeRepoView() - // register a Show/Hide function for the repo list table - me.repos.View.RegisterHideFunction(showHideRepos) - // the left side of the window options globalDisplayOptions(me.mainBox) @@ -89,17 +86,36 @@ func main() { // tool to release the code for this app, the gui and the gui toolkits // and sometimes they lie, don't display stuff, don't even disable things // so I can't trust even what I see. It's complicated right now still. - release.openrepo.Disable() + me.release.openrepo.Disable() + me.Disable() log.Sleep(5) // parse config file and scan for .git repos me.repos.initRepoList() + setTargetVersion() + + // register a Show/Hide function for the repo list table + me.repos.View.RegisterHideFunction(showHideRepos) - // reads in the State of all the repos + // scan in the State of all the repos // TODO: should not really be necessary directly after init() - // me.repos.View.ScanRepositories() + me.repos.View.ScanRepositories() + // find myself. the guireleaser directory is used as a working scratchpad + // for running go commands that can mess up the go.* files + for _, repo := range me.repos.View.AllRepos() { + if repo.GoPath() == "go.wit.com/apps/guireleaser" { + if me.release.guireleaser == nil { + me.release.guireleaser = repo + } + } + } + + if me.release.guireleaser == nil { + log.Info("Can not release if guireleaser was not found") + os.Exit(0) + } me.Enable() // intermittently scans the status indefinitly -- cgit v1.2.3