summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-22 21:22:07 -0600
committerJeff Carr <[email protected]>2024-11-22 21:22:07 -0600
commite8b8316f234026c6ece35ddc5f21609053a389a4 (patch)
tree8f428cac1e85e9d641d84ccfb48342d28dadb617
parentd9b91402cfd0e5977cfa502467b09c9e17e5ec77 (diff)
attempt go mod init & tidy
-rw-r--r--doRelease.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/doRelease.go b/doRelease.go
index 55ff7df..9cdd6d3 100644
--- a/doRelease.go
+++ b/doRelease.go
@@ -32,6 +32,8 @@ func doRelease() bool {
} 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"})
return false
}
@@ -186,7 +188,14 @@ func doPublishVersion() bool {
if gopath == "go.wit.com/apps/guireleaser" {
log.Info("CAN NOT SELF UPDATE. cmd =", docmd)
log.Info("go get must be run from somewhere else other than guireleaser")
- result = shell.PathRun("/home/jcarr/go/src/go.wit.com/apps/autotypist", docmd)
+ log.Info("chdir to autotypist if it exists")
+ if shell.Exists("/home/jcarr/go/src/go.wit.com/apps/autotypist") {
+ os.Chdir("/home/jcarr/go/src/go.wit.com/apps/autotypist")
+ } else {
+ log.Info("need to chdir somewhere with go.sum & go.mod")
+ return false
+ }
+ // result = shell.PathRun("/home/jcarr/go/src/go.wit.com/apps/autotypist", docmd)
} else {
// publish go.mod & go.sum for use with go
os.Unsetenv("GO111MODULE")