diff options
| author | Jeff Carr <[email protected]> | 2025-10-07 13:20:40 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-07 13:20:40 -0500 |
| commit | e07eae84fd550cd52a46f92912cf1b1b755ab75f (patch) | |
| tree | 72aa5b122b644a6ebe9422b9a5f3e4dcad1dcaff | |
| parent | 9cea97eba7242d179c997999b2fac957912e5cd1 (diff) | |
try to figure out what went wrongv0.1.22
| -rw-r--r-- | doBuild.go | 18 | ||||
| -rw-r--r-- | doDebian.go | 5 | ||||
| -rw-r--r-- | doPublish.go | 6 |
3 files changed, 14 insertions, 15 deletions
@@ -30,6 +30,11 @@ func doBuild() error { if argv.Build.Debian != nil { doBuildDeb() + if totalBuilt > 0 { + if _, err := shell.RunRealtimeError([]string{"do-aptly"}); err != nil { + me.sh.BadExit("aptly failed", nil) + } + } okExit("") } @@ -158,20 +163,9 @@ func doInstallScan() { } } - debname := name + "_" + ver + "_amd64.deb" - // debnames[check] = debname - outdir := getOutdir(check) - _, err := os.Stat(filepath.Join(outdir, debname)) - if err == nil { - // log.Info("exists", filepath.Join(outdir, debname)) - check.State = "in incoming" - } else { - // log.Info(debname, "does not exist") - } - state := check.GetState() // todo: get all this shit into the protobuf - start = fmt.Sprintf("%-18.18s %-24s %-50s", state, ver, debname) + start = fmt.Sprintf("%-18.18s %-24s", state, ver) if strings.HasPrefix(check.GetState(), "unknown bran") { state = "need to build" } diff --git a/doDebian.go b/doDebian.go index bedb691..fd2bde2 100644 --- a/doDebian.go +++ b/doDebian.go @@ -68,6 +68,8 @@ func isDebianRelease() bool { return argv.Build.Debian.Release } +var totalBuilt int + func buildDeb(check *gitpb.Repo) error { var cmd []string @@ -82,7 +84,7 @@ func buildDeb(check *gitpb.Repo) error { if me.forge.Config.IsPrivate(check.GetNamespace()) { cmd = []string{"go-deb", "--namespace", check.Namespace, "--dir", outdir} - return nil + // return nil } if argv.Verbose { @@ -98,6 +100,7 @@ func buildDeb(check *gitpb.Repo) error { log.Info("Building .deb", cmd) var err error if _, err = check.RunVerboseOnError(cmd); err != nil { + totalBuilt += 1 log.Info(check.FullPath, cmd) return err } diff --git a/doPublish.go b/doPublish.go index 3b57214..0c13f55 100644 --- a/doPublish.go +++ b/doPublish.go @@ -65,8 +65,10 @@ func doPublish() error { if err := doBuildDeb(); err != nil { me.sh.BadExit("debian packages failed", err) } - if _, err := shell.RunRealtimeError([]string{"do-aptly"}); err != nil { - me.sh.BadExit("aptly failed", nil) + if totalBuilt > 0 { + if _, err := shell.RunRealtimeError([]string{"do-aptly"}); err != nil { + me.sh.BadExit("aptly failed", nil) + } } if _, err := shell.RunRealtimeError([]string{"forge", "mode", "normal"}); err != nil { |
