]> mj.ucw.cz Git - libucw.git/blob - maint/release
Merge branch 'dev-table'
[libucw.git] / maint / release
1 #!/usr/bin/perl
2 # A simple script for making releases of LibUCW
3 # (c) 2012--2014 Martin Mares <mj@ucw.cz>
4
5 use strict;
6 use warnings;
7 require "maint/release.pm";
8
9 my $r = new UCW::Release("libucw");
10 $r->{"test_compile"} = "./configure && make -j4";
11 $r->{"archive_dir"} = $ENV{"HOME"} . "/archives/libucw";
12 push @{$r->{"uploads"}}, { "url" => "scp://ftp.ucw.cz/~ftp/pub/libucw/" };
13
14 $r->ParseOptions;
15 $r->GetVersionFromGit;
16 $r->InitDist("maint/tmp");
17 my $reldir = $r->GenPackage;
18 $r->GenFile("README");
19 $r->Test;
20 $r->MakeArchive;
21 $r->Upload;
22
23 if ($r->{"do_upload"}) {
24         my $tdir = $r->{"TESTDIR"};
25         if (defined $tdir) {
26                 print "Generating documentation\n";
27                 `cd $tdir && make install-libucw-docs INSTALL_DOC_DIR=../doc`;
28                 die if $?;
29                 print "Upload of documentation\n";
30                 $r->Confirm;
31                 system qw(rsync -avz --delete maint/tmp/doc/ucw/ jw:/var/www/libucw/doc/);
32                 die if $@;
33         } else {
34                 print "WARNING: With --notest, no documentation is published!\n";
35         }
36 }