summaryrefslogtreecommitdiff
path: root/doBuild.debian.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-26 13:47:18 -0500
committerJeff Carr <[email protected]>2025-10-26 13:47:18 -0500
commit37a05aa8e02aa6fbc10bc873dbc731d6a947f9bf (patch)
tree770fdc89c44e150419298d56138a921f9c9a4bf7 /doBuild.debian.go
parent45ffdae423f5d73579d933806436b1105c96a5e5 (diff)
new .deb build code
Diffstat (limited to 'doBuild.debian.go')
-rw-r--r--doBuild.debian.go55
1 files changed, 43 insertions, 12 deletions
diff --git a/doBuild.debian.go b/doBuild.debian.go
index 637d3d6..7317e27 100644
--- a/doBuild.debian.go
+++ b/doBuild.debian.go
@@ -201,6 +201,28 @@ func getBuildVersion(repo *gitpb.Repo) (int, error) {
return newi, err
}
+func getOutdir(repo *gitpb.Repo) string {
+ if me.forge.Config.IsPrivate(repo.GetNamespace()) {
+ return "/home/jcarr/incoming-private"
+ }
+ if argv.Force {
+ return "/home/jcarr/incoming"
+ }
+ if repo.GetLastTag() != repo.GetMasterVersion() {
+ return "/home/jcarr/incoming-devel"
+ }
+
+ if repo.GetCurrentBranchVersion() != repo.GetMasterVersion() {
+ return "/home/jcarr/incoming-devel"
+ }
+
+ if repo.CheckDirty() {
+ return "/home/jcarr/incoming-dirty-junk"
+ }
+
+ return "/home/jcarr/incoming"
+}
+
func buildDeb(repo *gitpb.Repo) error {
var cmd []string
@@ -267,24 +289,33 @@ func buildDeb(repo *gitpb.Repo) error {
return nil
}
-func getOutdir(repo *gitpb.Repo) string {
- if me.forge.Config.IsPrivate(repo.GetNamespace()) {
- return "/home/jcarr/incoming-private"
+func makeGoDebCmd(repo *gitpb.Repo, bvers string, arch string) []string {
+ var cmd []string
+
+ outdir := getOutdir(repo)
+
+ if isDebianRelease() {
+ cmd = []string{"go-deb", "--release", "--namespace", repo.Namespace, "--dir", outdir}
+ } else {
+ cmd = []string{"go-deb", "--namespace", repo.Namespace, "--dir", outdir}
}
- if argv.Force {
- return "/home/jcarr/incoming"
+
+ if me.forge.Config.IsPrivate(repo.GetNamespace()) {
+ cmd = []string{"go-deb", "--namespace", repo.Namespace, "--dir", outdir}
+ // return nil
}
- if repo.GetLastTag() != repo.GetMasterVersion() {
- return "/home/jcarr/incoming-devel"
+
+ if bvers != "" {
+ cmd = append(cmd, "--buildversion", bvers)
}
- if repo.GetCurrentBranchVersion() != repo.GetMasterVersion() {
- return "/home/jcarr/incoming-devel"
+ if arch != "" {
+ cmd = append(cmd, "--arch", arch)
}
- if repo.CheckDirty() {
- return "/home/jcarr/incoming-dirty-junk"
+ if env.True("Verbose") {
+ cmd = append(cmd, "--verbose")
}
- return "/home/jcarr/incoming"
+ return cmd
}