summaryrefslogtreecommitdiff
path: root/doRelease.go
diff options
context:
space:
mode:
Diffstat (limited to 'doRelease.go')
-rw-r--r--doRelease.go27
1 files changed, 10 insertions, 17 deletions
diff --git a/doRelease.go b/doRelease.go
index 3f4c215..d9aa51d 100644
--- a/doRelease.go
+++ b/doRelease.go
@@ -36,13 +36,6 @@ func doRelease() bool {
} else {
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()
@@ -206,16 +199,16 @@ func doPublishVersion() bool {
docmd := []string{"go", "get", "-v", gopath + "@" + me.release.version.String()}
log.Info("SHOULD RUN cmd HERE:", docmd)
- // right now, you can't publish this because the go.* files in this project are screwed up
- if me.release.guireleaser == nil {
- log.Info("CAN NOT SELF UPDATE HERE. cmd =", docmd)
- return false
- }
- homeDir, _ := os.UserHomeDir()
- gosum := filepath.Join(homeDir, "go/src/go.wit.com/apps/guireleaser/go.sum")
- if !shell.Exists(gosum) {
- log.Info("go.sum must exist here")
- me.release.guireleaser.MakeRedoMod()
+ testf := filepath.Join(me.forge.GetGoSrc(), "go.wit.com/apps/guireleaser", "go.sum")
+ if !shell.Exists(testf) {
+ pb := me.forge.Repos.FindByGoPath("go.wit.com/apps/guireleaser")
+ if pb != nil {
+ pb.RedoGoMod() // hack for reset on guireleaser while publishing
+ }
+ if !shell.Exists(testf) {
+ log.Info("go.sum missing", testf)
+ panic("redo go.sum")
+ }
}
if me.current.Status.IsPrivate() {
// do not self update private repos