# CALLER MUST PREVENT MULTIPLE CONCURRENT RUNS IN SAME CWD
# If we fail (exit nonzero), caller should capture our stderr,
# and retry some bounded number of times in some appropriate way
+ # Uses whatever ambient gpg key is available
@ARGV==2 or die;
my $url;
my @fetch = qw(git fetch origin --unshallow);
if (defined $upstreamt) {
- runcmd qw(git check-ref-format), "refs/tags/$upstreamt";
runcmd qw(git check-ref-format), "refs/tags/$upstreamt";
my $utagref = "refs/tags/$upstreamt";
push @fetch, "$utagref:$utagref";
runcmd qw(git checkout -q), "refs/tags/$tagval";
+ my $clogp = parsechangelog();
+ my $clogf = sub {
+ my ($f, $exp) = @_;
+ my $got = getfield $clogp, $f;
+ return if $got eq $exp;
+ reject "mismatch: changelog $f $got != $exp";
+ };
+ $clogf->('Version', $version);
+ $clogf->('Source', $package);
+
@fetch = (@dgit, qw(fetch), $suite);
debugcmd "+",@_;
$!=0; $?=-1;
}
# this is just to get the orig, so we don't really care about the ref
if (defined $upstreamc) {
- $upstreamc eq git_rev_parse "refs/tags/$upstreamt" or die;
+ my $need_upstreamc = git_rev_parse "refs/tags/$upstreamt";
+ $upstreamc eq $need_upstreamc or reject
+ "upstream-commitish=$upstreamc but tag refers to $need_upstreamc";
runcmd qw(git deborig), "$upstreamc";
}
}
}
push @dgitcmd, qw(push-source --new --overwrite), $suite;
- # xxx what about the key to use?
runcmd @dgitcmd;