summaryrefslogtreecommitdiff
path: root/build.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-18 04:48:34 -0600
committerJeff Carr <[email protected]>2025-01-18 04:48:34 -0600
commit538531f50350fb7c63b2dd08372c89275a834763 (patch)
tree75cdf85ee6dc3ae9420a68a257b65626d8aa36e4 /build.go
parente8f29e593d71cf4f12763d9e88466aa57cb54807 (diff)
this is a dumb idea. never do this. fix the repo.v0.0.52
Diffstat (limited to 'build.go')
-rw-r--r--build.go18
1 files changed, 18 insertions, 0 deletions
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
+}