diff options
| author | Jeff Carr <[email protected]> | 2025-10-04 17:44:27 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-04 17:44:27 -0500 |
| commit | 88cf5058f1162249b9d95b6c36628b20960550ba (patch) | |
| tree | 51a86e19d1e93660b9239fe0728194f6587a5a05 | |
| parent | fa6eff0ac4db3dddc13875f6dcc86a821e75567b (diff) | |
another attemptv0.1.7
| -rw-r--r-- | doDebian.go | 44 | ||||
| -rw-r--r-- | doPublish.go | 8 |
2 files changed, 50 insertions, 2 deletions
diff --git a/doDebian.go b/doDebian.go index 339fe7d..34861f0 100644 --- a/doDebian.go +++ b/doDebian.go @@ -210,3 +210,47 @@ func getOutdir(repo *gitpb.Repo) string { return "/home/jcarr/incoming" } + +func doOnlyDebianPackages() 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 + } + if len(files) > 0 { + cmd := []string{"rm"} + cmd = append(cmd, files...) + _, err := shell.RunRealtimeError(cmd) + return err + } + + initForge() + + found := gitpb.NewRepos() + for check := range me.forge.Repos.IterAll() { + if me.forge.Config.IsReadOnly(check.GetNamespace()) { + continue + } + + if !check.IsBinary() { + continue + } + + found.Append(check) + } + + printRepos(found) + + me.forge.ConfigRill(16, 16) + log.Info("STARTING .deb BUILDS repo len =", found.Len()) + 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 nil +} diff --git a/doPublish.go b/doPublish.go index c92b1f4..94cabbc 100644 --- a/doPublish.go +++ b/doPublish.go @@ -54,11 +54,15 @@ func doPublish() error { cmd = []string{"guireleaser", "--gui", "andlabs", "--auto-run", "quick"} if _, err := shell.RunRealtimeError(cmd); err != nil { + log.Info("releaser failed", err) me.sh.BadExit("publishing failed", nil) } - if err := doDebian(); err != nil { - me.sh.BadExit("debian packages failed", nil) + if err := doOnlyDebianPackages(); err != nil { + me.sh.BadExit("debian packages failed", err) + } + if _, err := shell.RunRealtimeError([]string{"do-aptly"}); err != nil { + me.sh.BadExit("aptly failed", nil) } me.sh.GoodExit("PUBLISH WORKED") |
