summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2017-02-04 16:30:13 -0700
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-01-07 19:31:59 +0000
commit16ccc5dda376696f4cb37639017dc13e70ca9324 (patch)
tree83d9c17ebdacd7f11098215dedb2bc402a7b0e2a /dgit
parent58c8f2001ffd3e7525c719d2b11197d96cf23785 (diff)
dgit: New command: push-source
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name> Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit22
1 files changed, 22 insertions, 0 deletions
diff --git a/dgit b/dgit
index 3420d5c..5557df5 100755
--- a/dgit
+++ b/dgit
@@ -540,6 +540,7 @@ main usages:
dgit [dgit-opts] build [dpkg-buildpackage-opts]
dgit [dgit-opts] sbuild [sbuild-opts]
dgit [dgit-opts] push [dgit-opts] [suite]
+ dgit [dgit-opts] push-source [dgit-opts] [suite]
dgit [dgit-opts] rpush build-host:build-dir ...
important dgit options:
-k<keyid> sign tag and package with <keyid> instead of default
@@ -4592,6 +4593,21 @@ sub cmd_push {
dopush();
}
+sub cmd_push_source {
+ prep_push();
+ if ($changesfile) {
+ my $changes = parsecontrol("$buildproductsdir/$changesfile",
+ "source changes file");
+ unless (test_source_only_changes($changes)) {
+ fail "user-specified changes file is not source-only";
+ }
+ } else {
+ # Building a source package is very fast, so just do it
+ build_source_for_push();
+ }
+ dopush();
+}
+
#---------- remote commands' implementation ----------
sub pre_remote_push_build_host {
@@ -6177,6 +6193,12 @@ sub cmd_gbp_build {
}
sub cmd_git_build { cmd_gbp_build(); } # compatibility with <= 1.0
+sub build_source_for_push {
+ build_source();
+ maybe_unapply_patches_again();
+ $changesfile = $sourcechanges;
+}
+
sub build_source {
build_prep_early();
build_prep();