testing automation

This commit is contained in:
Jeff Carr 2024-12-10 01:47:13 -06:00
parent 2b21ee65d7
commit 8ba815f12e
1 changed files with 15 additions and 1 deletions

16
main.go
View File

@ -89,7 +89,9 @@ func main() {
if argv.Build {
if err := forge.Build(argvRepo, nil); err == nil {
okExit("build worked")
argvRepo.RunEcho([]string{"ls", "-l"})
} else {
argvRepo.RunEcho([]string{"ls", "-l"})
badExit(err)
}
}
@ -214,7 +216,19 @@ func build() error {
}
}
if argv.Build {
return forge.Build(argvRepo, nil)
err := forge.Build(argvRepo, nil)
pwd, _ := os.Getwd()
if err == nil {
log.Info("this totally worked", pwd)
shell.RunEcho([]string{"ls", "-l"})
log.Info("ran ls")
} else {
log.Info("this totally did not work", pwd)
shell.RunEcho([]string{"ls", "-l"})
log.Info("ran ls")
}
return err
}
log.Info("skipping build")
return nil