sortcut for finding Getwd() repo

This commit is contained in:
Jeff Carr 2024-12-16 00:19:23 -06:00
parent 0b09db58dd
commit 6922059a0b
3 changed files with 9 additions and 4 deletions

View File

@ -5,7 +5,7 @@
# go install
all: vet goimports forgeConfig.pb.go uuid.pb.go patch.pb.go vet
all: goimports forgeConfig.pb.go uuid.pb.go patch.pb.go vet
vet:
@GO111MODULE=off go vet

View File

@ -198,3 +198,11 @@ func (f *Forge) runAutogenpb(repo *gitpb.Repo) error {
}
return nil
}
// sortcut to find
func (f *Forge) FindWorkingDirRepo() *gitpb.Repo {
pwd, _ := os.Getwd()
basedir := strings.TrimPrefix(pwd, f.GetGoSrc())
basedir = strings.Trim(basedir, "/")
return f.Repos.FindByGoPath(basedir)
}

View File

@ -1,3 +0,0 @@
// Package forgepb describes the protobuf's used by 'go.wit.com/apps/forge'
package forgepb // import "go.wit.com/lib/protobuf/forgepb"
// `go-clean go=1.18`