summaryrefslogtreecommitdiff
path: root/doBuild.debian.go
diff options
context:
space:
mode:
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
}