summaryrefslogtreecommitdiff
path: root/doRelease.go
diff options
context:
space:
mode:
Diffstat (limited to 'doRelease.go')
-rw-r--r--doRelease.go21
1 files changed, 19 insertions, 2 deletions
diff --git a/doRelease.go b/doRelease.go
index e2774d5..0847227 100644
--- a/doRelease.go
+++ b/doRelease.go
@@ -99,6 +99,23 @@ func doRelease() error {
badExit(errors.New(msg))
}
+ // this is the final check. even here, just to be a total asshole
+ // I rerun go mod init and go mod tidy
+ // the re-parse all the results
+ // this is the last and final check.
+ // believe it or not, I've seen this fail. It's not worth being careful here
+ // or liberal about it. if it doesn't work, yep, you are stuck here you bastard
+ // (bastard being me. I designed this to be so annoying that if it makes it
+ // past this point it always works. that is the whole point of this code. NEVER
+ // EVER FAIL PAST THIS POINT
+ // )
+ // so let's do it: let's run go-mod-clean strict
+ // then reparse everything
+ _, err := check.RunVerboseOnError([]string{"go-mod-clean", "strict"})
+ if err != nil {
+ badExit(err)
+ }
+
var all [][]string
var autogen []string
all = append(all, []string{"git", "add", "-f", "go.mod"})
@@ -152,9 +169,9 @@ func doRelease() error {
time.Sleep(3 * time.Second)
// this can fail to update, try it again after sleep(3s)
if !doPublishVersion() {
- log.Info("PUBLISH FAILED")
+ log.Info("PUBLISH FAILED gopath=%s", check.GetGoPath())
findOk = false
- return fmt.Errorf("PUBLISH FAILED %s", check.GetGoPath())
+ return fmt.Errorf("PUBLISH FAILED gopath=%s", check.GetGoPath())
}
}