summaryrefslogtreecommitdiff
path: root/doRelease.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-02 05:13:17 -0600
committerJeff Carr <[email protected]>2024-12-02 05:13:17 -0600
commitcfb4fb61bfab6e6816c0080b47d6a6d4b935cea2 (patch)
tree91be3748e0fb1c09cd0fa169d78ef65fc657fcb8 /doRelease.go
parent02f7ee387ff083d5c39b3d99ec9defe3e66e3700 (diff)
more rewriting of old code
Diffstat (limited to 'doRelease.go')
-rw-r--r--doRelease.go30
1 files changed, 22 insertions, 8 deletions
diff --git a/doRelease.go b/doRelease.go
index a3c5ec8..e350db3 100644
--- a/doRelease.go
+++ b/doRelease.go
@@ -29,11 +29,15 @@ func doRelease() bool {
if shell.Exists("go.mod") {
log.Info("go.mod exists ok")
} else {
- pwd, _ := os.Getwd()
- log.Info("go.mod disappeared. need to run go mod init and go mod tidy here:", pwd)
- shell.RunRealtime([]string{"go", "mod", "init"})
- shell.RunRealtime([]string{"go", "mod", "tidy"})
- shell.RunRealtime([]string{"go", "mod", "edit", "-go=1.20"})
+ log.Info("go.mod missing")
+ return false
+ /*
+ pwd, _ := os.Getwd()
+ log.Info("go.mod disappeared. need to run go mod init and go mod tidy here:", pwd)
+ shell.RunRealtime([]string{"go", "mod", "init"})
+ shell.RunRealtime([]string{"go", "mod", "tidy"})
+ shell.RunRealtime([]string{"go", "mod", "edit", "-go=1.20"})
+ */
}
curName := me.current.Status.GetCurrentBranchName()
@@ -43,7 +47,12 @@ func doRelease() bool {
return false
}
- if !checkValidGoSum(me.current) {
+ check := me.forge.Repos.FindByGoPath(me.current.GoPath())
+ if check == nil {
+ log.Info("boo, you didn't git clone", me.current.GoPath())
+ return false
+ }
+ if !me.forge.FinalGoDepsCheck(check) {
return false
}
@@ -116,7 +125,7 @@ func doRelease() bool {
me.current.NewScan()
pb := me.forge.Repos.FindByGoPath(me.current.GoPath())
if pb != nil {
- pb.RedoGoMod()
+ pb.ParseGoSum()
if pb.Published != nil {
loop := pb.Published.SortByGoPath()
for loop.Scan() {
@@ -153,7 +162,12 @@ func doReleaseFindNext() bool {
log.Info("findNext() could not find anything")
return false
}
- if checkValidGoSum(me.current) {
+ check := me.forge.Repos.FindByGoPath(me.current.GoPath())
+ if check == nil {
+ log.Info("boo, you didn't git clone", me.current.GoPath())
+ return false
+ }
+ if me.forge.FinalGoDepsCheck(check) {
return true
}
return false