summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-22 09:42:13 -0600
committerJeff Carr <[email protected]>2025-02-22 09:42:13 -0600
commitf0e327f8349d62126ddde40242c01648f0d7f1c4 (patch)
treefb26444badc2972458914c660bc9b8c9fa222a9d
parentd687de6c043b6f3fd67827fd9f12e8af3ece0d68 (diff)
-rw-r--r--main.go137
-rw-r--r--structs.go2
2 files changed, 0 insertions, 139 deletions
diff --git a/main.go b/main.go
index bd87ba8..09709a0 100644
--- a/main.go
+++ b/main.go
@@ -11,7 +11,6 @@ import (
"unicode"
"go.wit.com/dev/alexflint/arg"
- "go.wit.com/gui"
"go.wit.com/lib/gui/shell"
"go.wit.com/lib/protobuf/forgepb"
"go.wit.com/lib/protobuf/gitpb"
@@ -54,9 +53,6 @@ func main() {
}
me.machine.InitWit()
- me.myGui = gui.New()
- me.myGui.Default()
-
if argv.Clone != nil {
if argv.RepoMap != "" {
repomap(argv.RepoMap)
@@ -140,139 +136,6 @@ func main() {
}
okExit("everything compiled")
-
- /*
- all := me.forge.Repos.SortByFullPath()
- for all.Scan() {
- check := all.Next()
-
- repotype := check.GetRepoType()
- if repotype == "binary" || repotype == "plugin" {
- // we only want to process things that can be compiled with 'go build'
- } else {
- // log.Info("skipping repo", check.GetGoPath(), repotype)
- continue
- }
-
- if me.forge.Config.IsReadOnly(check.GetGoPath()) {
- // ignore read only stuff
- continue
- }
-
- // var cmd []string
- var start string
- var end string
-
- // add te repotype
- end += check.GetRepoType()
-
- manufactured := check.GetCurrentVersion()
- ver := trimNonNumericFromStart(manufactured)
- name := me.forge.Config.DebName(check.GetGoPath())
- var realver string
- if installedPackage := me.machine.FindInstalledByName(name); installedPackage != nil {
- realver = installedPackage.Version
- }
- if actualp := me.machine.FindVersion(name, ver); actualp != nil {
- end += " (version match) " + actualp.Version + " " + ver + " "
- state[check] = "on mirrors"
- } else {
- if realver != "" {
- end += fmt.Sprintf(" (version miss) %s vs %s ", realver, ver)
- }
- // end += "" + ver + " "
- }
- if me.machine.IsInstalled(name) {
- if actualp := me.machine.FindInstalledByName(name); actualp != nil {
- if ver != actualp.Version {
- end += "(installed " + actualp.Version + ") "
- } else {
- end += "(installed ok) "
- }
- } else {
- end += "(installed) "
- }
- }
-
- debname := name + "_" + ver + "_amd64.deb"
- debnames[check] = debname
- outdir := getOutdir(check)
- _, err := os.Stat(filepath.Join(outdir, debname))
- if err == nil {
- // log.Info("exists", filepath.Join(outdir, debname))
- state[check] = "in incoming"
- } else {
- // log.Info(debname, "does not exist")
- }
-
- if state[check] == "" {
- state[check] = "need to build"
- }
- start = fmt.Sprintf("%-15s %-20s %-50s", state[check], ver, debname)
-
- if state[check] == "need to build" {
- end += " (will build) "
- }
-
- log.Info(start, end)
- if name == "" {
- // err := fmt.Sprintf("name is blank error %+v", repo)
- log.Warn("name is blank error", check.GetGoPath())
- }
-
- if argv.DryRun {
- continue
- }
- if argv.TestBuild != nil {
- if argv.DryRun {
- continue
- }
- if argv.Verbose {
- verbose := []string{"-v", "-x"}
- if err := me.forge.Build(check, verbose); err != nil {
- log.Warn("BUILD FAILED", check.GetGoPath(), err)
- failed[check] = fmt.Sprintf("%s %s %v", "go build", check.GetGoPath(), err)
- }
- } else {
- if err := me.forge.Build(check, nil); err != nil {
- log.Warn("BUILD FAILED", check.GetGoPath(), err)
- failed[check] = fmt.Sprintf("%s %s %v", "go build", check.GetGoPath(), err)
- }
- }
- continue
- }
-
- if argv.MakeInstall != nil {
- log.Info("STARTING 'make install' in", check.GetGoPath())
- if argv.DryRun {
- continue
- }
- if argv.Verbose {
- verbose := []string{"-v", "-x"}
- if err := me.forge.Install(check, verbose); err != nil {
- log.Warn("INSTALL FAILED", check.GetGoPath(), err)
- failed[check] = fmt.Sprintf("%s %s %v", "go install", check.GetGoPath(), err)
- }
- } else {
- if err := me.forge.Install(check, nil); err != nil {
- log.Warn("INSTALL FAILED", check.GetGoPath(), err)
- failed[check] = fmt.Sprintf("%s %s %v", "go install", check.GetGoPath(), err)
- }
- }
- continue
- }
- }
- if len(failed) != 0 {
- log.Info("")
- log.Info("something failed on:")
- for repo, cmd := range failed {
- log.Info("failed cmd :", cmd, repo.GetGoPath())
- }
- // me.forge.CheckoutUser()
- // shell.Run([]string{"forge", "--find-private"})
- badExit(errors.New("some repos failed"))
- }
- */
}
// this is dumb. sync this with go-deb
diff --git a/structs.go b/structs.go
index e3c170c..bec7549 100644
--- a/structs.go
+++ b/structs.go
@@ -5,7 +5,6 @@ package main
import (
"go.wit.com/dev/alexflint/arg"
- "go.wit.com/gui"
"go.wit.com/lib/protobuf/forgepb"
"go.wit.com/lib/protobuf/zoopb"
)
@@ -15,7 +14,6 @@ var me *autoType
// this app's variables
type autoType struct {
argpp *arg.Parser // go-arg preprocessor
- myGui *gui.Node // the gui handle
forge *forgepb.Forge // your customized repo preferences and settings
machine *zoopb.Machine // your customized repo preferences and settings
}