summaryrefslogtreecommitdiff
path: root/doBuild.debian.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-08 06:32:36 -0500
committerJeff Carr <[email protected]>2025-10-08 06:32:36 -0500
commit6ee19a4e85ba449555f6fe0e51338e2d9882f611 (patch)
tree151a5fff2f744e9f281bd7ae5ee7c668c4dc276e /doBuild.debian.go
parent02527b3b11f23edb3cdafea6c0b46bc4cf3a4bed (diff)
maybe always return this way
Diffstat (limited to 'doBuild.debian.go')
-rw-r--r--doBuild.debian.go14
1 files changed, 6 insertions, 8 deletions
diff --git a/doBuild.debian.go b/doBuild.debian.go
index d037859..76a56f7 100644
--- a/doBuild.debian.go
+++ b/doBuild.debian.go
@@ -16,19 +16,18 @@ import (
var totalBuilt int
-func doBuildDeb() error {
+func doBuildDeb() (string, 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)
- return err
+ return "Error during globbing", err
}
if len(files) > 0 {
cmd := []string{"rm"}
cmd = append(cmd, files...)
_, err := fhelp.RunRealtimeError(cmd)
- return err
+ return "rm incoming/* failed", err
}
initForge()
@@ -54,13 +53,12 @@ func doBuildDeb() error {
stats := me.forge.RunOnRepos(found, buildDeb)
for s, stat := range stats {
if stat.Err != nil {
- log.Info("ERROR WITH buildDeb", s, stat.Err)
- return stat.Err
+ return "ERROR WITH buildDeb " + s, stat.Err
}
}
if totalBuilt == 0 {
// nothing built, no need to talk to mirrors
- return nil
+ return "everything is current", nil
}
if _, err := shell.RunVerbose([]string{"ls", "-l", "/home/jcarr/incoming"}); err != nil {
@@ -70,7 +68,7 @@ func doBuildDeb() error {
if _, err := fhelp.RunRealtimeError([]string{"do-aptly"}); err != nil {
me.sh.BadExit("aptly failed", nil)
}
- return nil
+ return "all .deb built ok", nil
}
// avoids nil panics