summaryrefslogtreecommitdiff
path: root/doStrict.go
diff options
context:
space:
mode:
Diffstat (limited to 'doStrict.go')
-rw-r--r--doStrict.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/doStrict.go b/doStrict.go
index 39192bd..f5e7cfa 100644
--- a/doStrict.go
+++ b/doStrict.go
@@ -9,13 +9,13 @@ import (
func doStrict(repo *gitpb.Repo) error {
if !repo.IsValidDir() {
- log.Info(repo.GoPath, "is invalid. fix your repos.pb file with 'forge' first")
+ log.Info(repo.GetGoPath(), "is invalid. fix your repos.pb file with 'forge' first")
log.Info("")
log.Info("go install go.wit.com/apps/forge@latest")
log.Info("")
- return errors.New(repo.GoPath + " is invalid. fix your repository list with 'forge' first")
+ return errors.New(repo.GetGoPath() + " is invalid. fix your repository list with 'forge' first")
}
- log.Info(repo.GoPath, "is valid according to forge")
+ log.Info(repo.GetGoPath(), "is valid according to forge")
repo.Run([]string{"git", "notes", "remove"})
@@ -27,17 +27,17 @@ func doStrict(repo *gitpb.Repo) error {
log.Info("You are not operating on your git master branch.")
log.Info("Publishing go.mod & go.sum files must come from from git version tag on the master branch")
log.Info("")
- return errors.New(repo.GoPath + " not in the git master branch")
+ return errors.New(repo.GetGoPath() + " not in the git master branch")
}
err := repo.RepoIgnoresGoMod()
if err != nil {
- log.Info(repo.GoPath, "some wierd git error happened. investigate.", err)
+ log.Info(repo.GetGoPath(), "some wierd git error happened. investigate.", err)
return err
}
- if forge.Config.IsReadOnly(repo.GoPath) {
- log.Info("you can not push to read only repositories.", repo.GoPath)
+ if forge.Config.IsReadOnly(repo.GetGoPath()) {
+ log.Info("you can not push to read only repositories.", repo.GetGoPath())
log.Info("change your .config/forge/ to indicate you own this repository")
return nil
}
@@ -46,10 +46,10 @@ func doStrict(repo *gitpb.Repo) error {
log.Info("")
log.Info("You can not continue on a dirty git repo.")
log.Info("")
- return errors.New(repo.GoPath + " git repo is dirty")
+ return errors.New(repo.GetGoPath() + " git repo is dirty")
}
- log.Info(repo.GoPath, "GOING TO MAKE NEW go.* FILES")
+ log.Info(repo.GetGoPath(), "GOING TO MAKE NEW go.* FILES")
// actually will re-create go.sum and go.mod now
if err := redoGoMod(repo); err != nil {
@@ -66,7 +66,7 @@ func doStrict(repo *gitpb.Repo) error {
// check go.sum file
if err := cleanGoDepsCheckOk(repo); err != nil {
- log.Info("forge.FinalGoDepsCheck() failed. boo. :", repo.GoPath)
+ log.Info("forge.FinalGoDepsCheck() failed. boo. :", repo.GetGoPath())
return err
}
@@ -74,7 +74,7 @@ func doStrict(repo *gitpb.Repo) error {
// this way, git commits are not messed up
// with this autogenerated code
if err := saveAsMetadata(repo); err != nil {
- log.Info("save go.mod as git metadata failed", repo.GoPath, err)
+ log.Info("save go.mod as git metadata failed", repo.GetGoPath(), err)
return err
}