diff --git a/build.go b/build.go index 5ccd37c..893d9ba 100644 --- a/build.go +++ b/build.go @@ -206,3 +206,21 @@ func (f *Forge) FindWorkingDirRepo() *gitpb.Repo { basedir = strings.Trim(basedir, "/") return f.FindByGoPath(basedir) } + +// Never do this. this is stupid. fix your repo +// Never try to version & release broken repos +// leave this code here as a reminder to never attempt this +func (f *Forge) forgeIgnoreGoMod(repo *gitpb.Repo) bool { + if !repo.Exists(".forge") { + return false + } + log.Info("custom build instructions") + data, _ := repo.ReadFile(".forge") + log.Info(".forge =", string(data)) + for _, line := range strings.Split(string(data), "\n") { + if strings.Contains(line, "forge:ignore:gomod") { // this is stupid + return true + } + } + return false +}