diff options
| author | Jeff Carr <[email protected]> | 2025-10-04 18:24:54 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-04 18:24:54 -0500 |
| commit | 11ee0bb0d2e3b3eb5169de880c4eaeb6f36987c9 (patch) | |
| tree | d7b8f66fe41f85a2d4e27b923fd6d7d1a7fe9a27 /doDebian.go | |
| parent | 88cf5058f1162249b9d95b6c36628b20960550ba (diff) | |
more debuggingv0.1.8
Diffstat (limited to 'doDebian.go')
| -rw-r--r-- | doDebian.go | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/doDebian.go b/doDebian.go index 34861f0..52753ca 100644 --- a/doDebian.go +++ b/doDebian.go @@ -149,13 +149,24 @@ func shouldBuild(repo *gitpb.Repo) bool { return false } +// avoids nil panics +func isDebianRelease() bool { + if argv.Build == nil { + return false + } + if argv.Build.Debian == nil { + return false + } + return argv.Build.Debian.Release +} + func buildDeb(check *gitpb.Repo) error { var cmd []string outdir := getOutdir(check) os.MkdirAll(outdir, 0755) - if argv.Build.Debian.Release { + if isDebianRelease() { cmd = []string{"go-deb", "--release", "--namespace", check.Namespace, "--dir", outdir} } else { cmd = []string{"go-deb", "--namespace", check.Namespace, "--dir", outdir} |
