X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=dgit;h=e86e398356fff4ce5462f23d71e894332698b008;hb=2c8fbe6d387f812a08847d3c521132961ae3e5b9;hp=3420d5ca9715ebf26a6b4eeebf9d0c5e4aba45ca;hpb=58c8f2001ffd3e7525c719d2b11197d96cf23785;p=dgit.git diff --git a/dgit b/dgit index 3420d5ca..e86e3983 100755 --- a/dgit +++ b/dgit @@ -2,7 +2,8 @@ # dgit # Integration between git and Debian-style archives # -# Copyright (C)2013-2016 Ian Jackson +# Copyright (C)2013-2017 Ian Jackson +# Copyright (C)2017 Sean Whitton # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -540,6 +541,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 sign tag and package with instead of default @@ -4592,6 +4594,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 +6194,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();