diff options
| author | Jeff Carr <[email protected]> | 2025-10-04 16:38:19 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-04 16:38:19 -0500 |
| commit | fa6eff0ac4db3dddc13875f6dcc86a821e75567b (patch) | |
| tree | 0e61a47a88fd447ccb34ec90eb3d81c64347bd94 /doDebian.go | |
| parent | 5082c154020a767350803ddf87aead8c5a9cdbdd (diff) | |
almost complete automationv0.1.6
Diffstat (limited to 'doDebian.go')
| -rw-r--r-- | doDebian.go | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/doDebian.go b/doDebian.go index c447dba..339fe7d 100644 --- a/doDebian.go +++ b/doDebian.go @@ -14,18 +14,19 @@ import ( "go.wit.com/log" ) -func doDebian() { +func doDebian() error { // clean out old deb files globPattern := filepath.Join(me.homedir, "incoming", "*.deb") files, err := filepath.Glob(globPattern) if err != nil { log.Info("Error during globbing:", err) - badExit(err) + return err } if len(files) > 0 { cmd := []string{"rm"} cmd = append(cmd, files...) - exitOnErrorRealtime(cmd) + _, err := shell.RunRealtimeError(cmd) + return err } initForge() @@ -59,7 +60,7 @@ func doDebian() { } dur := stat.End.Sub(stat.Start) log.Info("CRAP. INSTALL FAILED", shell.FormatDuration(dur), s, stat.Err) - badExit(stat.Err) + return stat.Err } } @@ -69,14 +70,15 @@ func doDebian() { for s, stat := range stats { if stat.Err != nil { log.Info("ERROR WITH buildDeb", s, stat.Err) - badExit(stat.Err) + return stat.Err } } if argv.DryRun { - return + return nil } - exitOnErrorRealtime([]string{"do-aptly"}) + _, err = shell.RunRealtimeError([]string{"do-aptly"}) + return err } func getStatusEnd(repo *gitpb.Repo) string { |
