chiark / gitweb /
wip changes for remote push - make tag ourselves
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 24 Sep 2013 22:02:50 +0000 (23:02 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 24 Sep 2013 22:02:50 +0000 (23:02 +0100)
dgit

diff --git a/dgit b/dgit
index 949d22c..3162c60 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -994,13 +994,21 @@ END
            $keyid = access_cfg('keyid','RETURN-UNDEF');
        }
        unlink $tfn->('.tmp.asc') or $!==&ENOENT or die $!;
-       my @sign_cmd = (@gpg, qw(--clearsign --armor));
+       my @sign_cmd = (@gpg, qw(--detach-sign --armor));
        push @sign_cmd, qw(-u),$keyid if defined $keyid;
        push @sign_cmd, $tfn->('.tmp');
        runcmd_ordryrun @sign_cmd;
-       if (!$dry
-       runcmd_ordryrun @
+       if (!$dryrun) {
+           $tagobjfn = $tfn->('.signed.tmp')
+           runcmd shell_cmd "> $tagobjfn", qw(cat --),
+               $tfn->('.tmp'), $tfn->('.tmp.asc');
+       }
     }
+    my $tag_obj_hash = runcmd @git, qw(hash-object -w -t tag), $tagobjfn;
+    runcmd_ordryrun @git, qw(verify-tag), $tag_obj_hash;
+    runcmd_ordryrun @git, qw(update-ref), "refs/tags/$tag", $tag_obj_hash;
+    runcmd_ordryrun @git, qw(tag -v --), $tag;
+
     if (!check_for_git()) {
        create_remote_git_repo();
     }