summaryrefslogtreecommitdiff
path: root/build.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-16 00:19:23 -0600
committerJeff Carr <[email protected]>2024-12-16 00:19:23 -0600
commit6922059a0b58904263c7119ebd8e96aabbb3053a (patch)
tree2dd5c66b5e4ecaa5673a0873e654ebcdfc8c4375 /build.go
parent0b09db58dd5b1b628729300484af66a21cf9a718 (diff)
sortcut for finding Getwd() repov0.0.35
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)
+}