]> mj.ucw.cz Git - libucw.git/commitdiff
Maint: Automatic uploads of documentation
authorMartin Mares <mj@ucw.cz>
Tue, 28 Jan 2014 22:14:52 +0000 (23:14 +0100)
committerMartin Mares <mj@ucw.cz>
Tue, 28 Jan 2014 22:14:52 +0000 (23:14 +0100)
maint/release
maint/release.pm

index ffc28d01626df0b03f8844bc860871587642a665..d43cc7beccb63e35dd18b7a2fe5e1e7c3e8418a7 100755 (executable)
@@ -20,8 +20,14 @@ $r->Test;
 $r->MakeArchive;
 $r->Upload;
 
-# my $tdir = $r->{"TESTDIR"};
-# if (defined $tdir) {
-# } else {
-#      print "WARNING: With --notest, no documentation is published!\n";
-# }
+if ($r->{"do_upload"}) {
+       my $tdir = $r->{"TESTDIR"};
+       if (defined $tdir) {
+               print "Upload of documentation\n";
+               $r->Confirm;
+               system qw(rsync -avz --delete), "$tdir/obj/ucw/doc/", qw(jw:/var/www/libucw/doc/ --exclude=*.deflist --exclude=*.txt);
+               die if $@;
+       } else {
+               print "WARNING: With --notest, no documentation is published!\n";
+       }
+}
index 8b9d2ef9ebe7e3e7e8cc8ab8a7f8b9dee59f5c8f..979067103d3585f9b4922d6abc7024727882a1f1 100644 (file)
@@ -322,6 +322,7 @@ sub MakePatch($) {
 
 sub Upload($) {
        my ($s) = @_;
+       $s->{"do_upload"} or return;
        foreach my $u (@{$s->{"uploads"}}) {
                my $url = $u->{"url"};
                print "Upload to $url :\n";