chiark / gitweb /
clean things
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 6d7e5740638ed259cd583e9d6f0ca89497f37988..f724369ab36d40381eaceb9884a4383e1cc84919 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -42,6 +42,7 @@ our (@git) = qw(git);
 our (@dget) = qw(dget);
 our (@dput) = qw(dput);
 our (@debsign) = qw(debsign);
+our (@cleancmd) = qw(debian/rules clean);
 our $keyid;
 
 our $debug = 0;
@@ -584,7 +585,7 @@ sub commit_quilty_patch () {
 
 sub dopush () {
     print DEBUG "actually entering push\n";
-    runcmd qw(debian/rules clean);
+    runcmd @cleancmd;
     my $clogp = parsechangelog();
     $package = $clogp->{Source};
     my $dscfn = "${package}_$clogp->{Version}.dsc";
@@ -734,6 +735,7 @@ sub cmd_build {
     my $clogp = parsechangelog();
     $suite = $clogp->{Distribution};
     $package = $clogp->{Source};
+    canonicalise_suite() unless grep { m/^--git-debian-branch/ } @ARGV;
     runcmd_ordryrun
        qw(git-buildpackage -us -uc --git-no-sign-tags),
        '--git-builder=dpkg-buildpackage -i\.git/ -I.git',
@@ -760,6 +762,8 @@ sub parseopts () {
                push @$om, $2;
            } elsif (m/^--existing-package=(.*)/s) {
                $existing_package = $1;
+           } elsif (m/^--clean-command=(.*)/s) {
+               @cleancmd = split /\s+/, $1;
            } else {
                die "$_ ?";
            }