summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2018-07-23 12:10:02 +0800
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-07-25 10:16:16 +0100
commitfc8a490c9eda9c4c16303362d1d0b20fb54b22ec (patch)
tree5378531d95fea9ba61112d18c10370ff1c99f03f
parent35b159e1e9e8d170732c8a5ca5dd58d3a3c3bcda (diff)
dgit: add dgit.default.build-products-dir git configuration key
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rwxr-xr-xdgit5
-rw-r--r--dgit.111
2 files changed, 15 insertions, 1 deletions
diff --git a/dgit b/dgit
index 0c55655..adf125a 100755
--- a/dgit
+++ b/dgit
@@ -63,7 +63,7 @@ our @ropts;
our $sign = 1;
our $dryrun_level = 0;
our $changesfile;
-our $buildproductsdir = '..';
+our $buildproductsdir;
our $new_package = 0;
our $ignoredirty = 0;
our $rmonerror = 1;
@@ -7064,6 +7064,9 @@ sub parseopts_late_defaults () {
badcfg "unknown clean-mode \`$cleanmode'" unless
$cleanmode =~ m/^($cleanmode_re)$(?!\n)/s;
}
+
+ $buildproductsdir //= access_cfg('build-products-dir', 'RETURN-UNDEF');
+ $buildproductsdir //= '..';
}
if ($ENV{$fakeeditorenv}) {
diff --git a/dgit.1 b/dgit.1
index 1460938..ddb0c0a 100644
--- a/dgit.1
+++ b/dgit.1
@@ -842,6 +842,11 @@ regardless of this option.
Specifies where to find the built files to be uploaded.
By default, dgit looks in the parent directory
.RB ( .. ).
+
+Also see the
+.BI dgit.default.build-products-dir
+configuration option
+(which this command line option overrides).
.TP
.BI --no-rm-on-error
Do not delete the destination directory if clone fails.
@@ -1096,6 +1101,12 @@ on the dgit command line.
.LP
Settings likely to be useful for an end user include:
.TP
+.BI dgit.default.build-products-dir
+Specifies where to find the built files to be uploaded,
+when --build-products-dir is not specified. The default is
+the parent directory
+.RB ( .. ).
+.TP
.BR dgit-suite. \fIsuite\fR .distro " \fIdistro\fR"
Specifies the distro for a suite. dgit keys off the suite name (which
appears in changelogs etc.), and uses that to determine the distro