diff options
Diffstat (limited to 'goDep.redoGoMod.go')
| -rw-r--r-- | goDep.redoGoMod.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/goDep.redoGoMod.go b/goDep.redoGoMod.go index 81e861f..ccf64ef 100644 --- a/goDep.redoGoMod.go +++ b/goDep.redoGoMod.go @@ -16,7 +16,7 @@ import ( // repos you can also type "make redomod" to do the same thing // since it's a Makefile task that is also useful to be able to run // from the command line -func (repo *Repo) MakeRedomod() (bool, error) { +func (repo *Repo) RedoGoMod() (bool, error) { // unset the go development ENV var to generate release files os.Unsetenv("GO111MODULE") if ok, err := repo.strictRun([]string{"rm", "-f", "go.mod", "go.sum"}); !ok { @@ -32,12 +32,11 @@ func (repo *Repo) MakeRedomod() (bool, error) { return ok, err } // most things should build with golang after 1.20 - // TODO: move this to autogenpb if ok, err := repo.strictRun([]string{"go", "mod", "edit", "-go=1.20"}); !ok { log.Warn("go mod edit failed", err) return ok, err } - log.Info("MakeRedomod() worked", repo.GoPath) + // log.Info("MakeRedomod() worked", repo.GoPath) if repo.Exists("go.sum") { // return the attempt to parse go.mod & go.sum @@ -89,6 +88,9 @@ func (repo *Repo) parseGoSum() (bool, error) { GoPath: godep, Version: version, } + if repo.GoDeps == nil { + repo.GoDeps = new(GoDeps) + } repo.GoDeps.AppendUniqueGoPath(&new1) /* found := repo.FindGoDepByPath(godep) |
