summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/main.go b/main.go
index 6b6a74e..4fce146 100644
--- a/main.go
+++ b/main.go
@@ -4,6 +4,7 @@ import (
"embed"
"os"
"path/filepath"
+ "strings"
"go.wit.com/dev/alexflint/arg"
"go.wit.com/gui"
@@ -111,10 +112,13 @@ func main() {
}
}
- me.startRepo = me.forge.Repos.FindByGoPath("go.wit.com/apps/helloworld")
+ pwd, _ := os.Getwd()
+ basedir := strings.TrimPrefix(pwd, me.forge.GetGoSrc())
+ basedir = strings.Trim(basedir, "/")
+ me.startRepo = me.forge.Repos.FindByGoPath(basedir)
if me.startRepo == nil {
- log.Info("Can not release if guireleaser was not found")
+ log.Info("Can not run if pwd is not a repo", basedir)
os.Exit(0)
}
me.Enable()