summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-11 14:21:09 -0500
committerJeff Carr <[email protected]>2025-09-11 14:21:09 -0500
commitb05b706d8b48a51275a8dc0c90cd8fafc74d61d1 (patch)
tree489a39cafeda829ac3a97a26a8c599f07ef0a343 /main.go
parentfd199a4404f7675935660c6975ac25ba6c84aba1 (diff)
raw gitpb Repo() scan
Diffstat (limited to 'main.go')
-rw-r--r--main.go33
1 files changed, 9 insertions, 24 deletions
diff --git a/main.go b/main.go
index f6e358c..4045b80 100644
--- a/main.go
+++ b/main.go
@@ -7,9 +7,8 @@ import (
"time"
"go.wit.com/dev/alexflint/arg"
- "go.wit.com/lib/fhelp"
"go.wit.com/lib/gui/prep"
- "go.wit.com/lib/protobuf/forgepb"
+ "go.wit.com/lib/protobuf/gitpb"
"go.wit.com/log"
)
@@ -29,37 +28,23 @@ func main() {
me.myGui = prep.Gui() // prepares the GUI package for go-args
me.pp = arg.MustParse(&argv)
- if err := fhelp.ConfigureENV(); err != nil {
+ wd, err := os.Getwd()
+ if err != nil {
badExit(err)
}
- me.goSrc = os.Getenv("FORGE_GOSRC")
- if os.Getenv("FORGE_GOWORK") == "true" {
- me.hasWork = true
- }
- log.Info("GO src path", me.goSrc, "go.work is", me.hasWork)
-
- // set the go src path
- os.Setenv("REPO_WORK_PATH", me.goSrc)
-
- if argv.Forge != "" {
- me.forge = forgepb.Init()
- me.repo = me.forge.Repos.FindByFullPath(argv.Forge)
- if me.repo == nil {
- log.Info("repo not found", argv.Forge)
- me.repo = me.forge.FindByGoPath(argv.Forge)
- }
- if me.repo == nil {
- log.Info("forge failure. repo not found", argv.Forge)
- os.Exit(-1)
- }
- log.Info("found repo", me.repo.GetGoPath())
+ me.repo, err = gitpb.NewRepo(wd)
+ if err != nil {
+ badExit(err)
}
+
// build()
if argv.Show != nil {
log.Info("todo: show", me.repo.GetGoPath())
okExit("")
}
+ log.Info("todo: show", me.repo.GetNamespace(), me.repo.GetFullPath())
+ okExit("")
me.basicWindow = makebasicWindow()