summaryrefslogtreecommitdiff
path: root/build.go
diff options
context:
space:
mode:
Diffstat (limited to 'build.go')
-rw-r--r--build.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/build.go b/build.go
index 2457177..1fcb5cc 100644
--- a/build.go
+++ b/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)
+}