chiark / gitweb /
dgit: add dgit.default.build-products-dir git configuration key
authorSean Whitton <spwhitton@spwhitton.name>
Mon, 23 Jul 2018 04:10:02 +0000 (12:10 +0800)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 25 Jul 2018 09:16:16 +0000 (10:16 +0100)
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit
dgit.1

diff --git a/dgit b/dgit
index 0c55655a2917d22d5cefdcd3998057fa55874caf..adf125abc8086e5062bb2e9f453dda7457ce7a2b 100755 (executable)
--- 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 1460938a4e5f329be38385b287b9683b01f12671..ddb0c0a05b278f08760982d468262c0102b93641 100644 (file)
--- 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