2024-12-11 18:50:14 -06:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
2025-01-18 23:25:55 -06:00
|
|
|
"go.wit.com/lib/protobuf/gitpb"
|
2024-12-11 18:50:14 -06:00
|
|
|
"go.wit.com/log"
|
|
|
|
)
|
|
|
|
|
|
|
|
func okExit(thing string) {
|
2025-01-08 10:10:14 -06:00
|
|
|
if thing != "" {
|
|
|
|
log.Info("forge exit:", thing, "ok")
|
|
|
|
}
|
2024-12-17 00:20:57 -06:00
|
|
|
if configSave {
|
2024-12-17 06:36:00 -06:00
|
|
|
me.forge.SetConfigSave(configSave)
|
2024-12-17 00:20:57 -06:00
|
|
|
}
|
2024-12-11 18:50:14 -06:00
|
|
|
// log.Info("Finished go-clean on", check.GetGoPath(), "ok")
|
2024-12-17 06:36:00 -06:00
|
|
|
me.forge.Exit()
|
2024-12-11 18:50:14 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
func badExit(err error) {
|
|
|
|
log.Info("forge failed: ", err, me.forge.GetGoSrc())
|
|
|
|
os.Exit(-1)
|
|
|
|
}
|
2025-01-18 23:25:55 -06:00
|
|
|
|
|
|
|
func badRepoExit(repo *gitpb.Repo, err error) {
|
2025-01-19 00:35:58 -06:00
|
|
|
log.Printf("forge failed on %s with %v\n", repo.GetGoPath(), err)
|
2025-01-18 23:25:55 -06:00
|
|
|
os.Exit(-1)
|
|
|
|
}
|