diff --git a/Makefile b/Makefile index 9d9b9bf..78c1723 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,10 @@ VERSION = $(shell git describe --tags) BUILDTIME = $(shell date +%Y.%m.%d) -all: goimports build +all: install goimports: + reset goimports -w *.go # // to globally reset paths: # // gofmt -w -r "go.wit.com/gui -> go.wit.com/gui/gui" . diff --git a/doRelease.go b/doRelease.go index 57e2233..68af367 100644 --- a/doRelease.go +++ b/doRelease.go @@ -34,7 +34,8 @@ func doRelease() bool { if shell.Exists("go.mod") { log.Info("go.mod exists ok") } else { - log.Info("go.mod missing") + pwd, _ := os.Getwd() + log.Info("go.mod missing in working dir", pwd) return false } @@ -164,6 +165,13 @@ func doRelease() bool { } log.Info("EVERYTHING OK. RERELEASED", me.current.Name()) + // save autogen files under the tag version (for example: "v0.2.3") + newtag := me.release.version.String() + if err := check.AutogenSave(autogen, newtag, true); err != nil { + log.Info("AutogenSave() error", err) + os.Exit(-1) + } + // it's necessary to recreate the the files here // safe to do this here. everything has been published fixGodeps(check)