sortcut for finding Getwd() repo
This commit is contained in:
parent
0b09db58dd
commit
6922059a0b
2
Makefile
2
Makefile
|
@ -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
|
||||
|
|
8
build.go
8
build.go
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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`
|
Loading…
Reference in New Issue