diff options
| -rw-r--r-- | doPublish.go | 55 | ||||
| -rw-r--r-- | prepareReleaseNew.go | 2 |
2 files changed, 11 insertions, 46 deletions
diff --git a/doPublish.go b/doPublish.go index b474436..e081b7a 100644 --- a/doPublish.go +++ b/doPublish.go @@ -36,6 +36,12 @@ func rillRestore(repo *gitpb.Repo) error { } else { _, err = repo.RunQuiet(cmd) } + + if env.True("--strict") { + cmd = []string{"go-mod-clean", "strict"} + _, err = repo.RunQuiet(cmd) + } + if err != nil { errs := fmt.Sprintf("%v failed (%v)", cmd, err) return errors.New(errs) @@ -43,6 +49,11 @@ func rillRestore(repo *gitpb.Repo) error { return nil } +// fuck you prior self. this code is garbage +// nevermind, I knew that when I wrote it. +// I'm back now to fix it. Thank you for making it work until I got back here +// shame you aren't as smart as fabrice. you might have done this on the first go around +// fine though, you have different talents. Also, Mariam loves you. func doPublish() error { initForge() env.PrintTable() @@ -114,50 +125,6 @@ func doPublish() error { if !env.True("--doit") { return errors.New("run with --doit to actually try to publish") } - // me.forge.RillFuncError(rillPurge) - - /* - saferepo := me.forge.Repos.FindByNamespace("go.wit.com/lib/xgb") // safe to run things here - if saferepo == nil { - return log.Errorf("need a safe place to run GO commands from") - } - os.Chdir(saferepo.FullPath) - - if os.Getenv("GUIRELEASE_REASON") == "" { - log.Info("$ENV[GUIRELEASE_REASON] was not set") - reason := fhelp.InputFromUser("set tag message:") - if reason == "" { - argvpb.BadExit("merge failed", fmt.Errorf("GUIRELEASE_REASON was blank")) - } - os.Setenv("GUIRELEASE_REASON", reason) - } - - var cmd []string - - cmd = []string{"forge", "merge", "--all"} - if _, err := shell.RunRealtimeError(cmd); err != nil { - argvpb.BadExit("merge failed", nil) - } - - cmd = []string{"forge", "merge", "check"} - if _, err := shell.RunRealtimeError(cmd); err != nil { - if _, err := shell.RunVerbose(cmd); err != nil { - argvpb.BadExit("merge failed", nil) - } - } - // todo: os.Stat() file - time.Sleep(time.Second) - me.forge.Repos.Load() - - if err := doInstall(me.forge.Repos); err != nil { - log.Info("doInstall() failed", err) - argvpb.BadExit("merge failed", nil) - } - - if os.Getenv("GUIRELEASE_REASON") == "" { - os.Setenv("GUIRELEASE_REASON", "automated") - } - */ argvpb.GoodExit("PUBLISH WORKED") return nil diff --git a/prepareReleaseNew.go b/prepareReleaseNew.go index 667f7b1..551b055 100644 --- a/prepareReleaseNew.go +++ b/prepareReleaseNew.go @@ -11,8 +11,6 @@ import ( ) func rePrepareReleaseNew(check *gitpb.Repo) error { - // me.forge.RillFuncError(rillRestore) - if me.forge.Config.IsReadOnly(check.GetGoPath()) { // can't release readonly repos return nil |
