Ticket #1159: make.releasecheck.diff

File make.releasecheck.diff, 3.4 KB (added by jkeenan, 4 years ago)

Updated diff of branch against its own branch-point

  • MANIFEST

    diff --git a/MANIFEST b/MANIFEST
    index c8e2cf0..3cc443d 100644
    a b  
    21742174tools/release/gen_release_info.pl                           [] 
    21752175tools/release/inc_ver.pir                                   [] 
    21762176tools/release/release.json                                  [] 
     2177tools/release/releasecheck.pl                               [] 
    21772178tools/release/templates.json                                [] 
    21782179# Local variables: 
    21792180#   mode: text 
  • config/gen/makefiles/root.in

    diff --git a/config/gen/makefiles/root.in b/config/gen/makefiles/root.in
    index 7076a6d..3321ec8 100644
    a b  
    5555# directory for developers' tools 
    5656# programs, templates, configuration files NOT invoked by 'make all' 
    5757DEV_TOOLS_DIR = tools/dev 
     58RELEASE_TOOLS_DIR = tools/release 
    5859 
    5960# directory for header files 
    6061INC_DIR         = include/parrot 
     
    823824        @echo "" 
    824825        @echo "Release:" 
    825826        @echo "  release:           Create a tarball." 
     827        @echo "  release_check:     Check that the tarball will build on its own." 
    826828        @echo "  win32-inno-installer:  Create MSWin32 setup." 
    827829        @echo "" 
    828830        @echo "Examples:" 
     
    29152917        mv MANIFEST.real MANIFEST 
    29162918        rm parrot-$(VERSION) 
    29172919 
     2920release_check: 
     2921        make release VERSION=$(SOVERSION) 
     2922        $(PERL) $(RELEASE_TOOLS_DIR)/releasecheck.pl 
     2923 
     2924relcheck : release_check 
     2925 
    29182926win32-inno-installer : world installable 
    29192927        $(PERL) $(DEV_TOOLS_DIR)/mk_inno.pl 
    29202928        $(INNO_SETUP) parrot.iss 
  • (a) /dev/null vs. (b) b/tools/release/releasecheck.pl

    diff --git a/tools/release/releasecheck.pl b/tools/release/releasecheck.pl
    new file mode 100644
    index 0000000..f5a285c
    a b  
     1# !perl 
     2use strict; 
     3use warnings; 
     4use Data::Dumper;$Data::Dumper::Indent=1; 
     5use Carp; 
     6use Cwd; 
     7use File::Copy; 
     8use File::Temp qw( tempdir ); 
     9 
     10my $cwd = cwd(); 
     11opendir my $DIRH, $cwd 
     12    or croak "Unable to open directory handle"; 
     13my @tarballs = grep { m/parrot-.*\.tar\.gz$/ } readdir $DIRH; 
     14closedir $DIRH or croak "Unable to close directory handle"; 
     15croak "Should find exactly one gzipped tarball" 
     16    unless @tarballs == 1; 
     17my $tb = $tarballs[0]; 
     18my $distro = ''; 
     19if ($tb =~ m/(parrot-\d+\.\d+\.\d+(?:-devel)?)\.tar\.gz$/ ) { 
     20    $distro = $1; 
     21} 
     22else { 
     23    croak "Unable to extract distro from $tb"; 
     24} 
     25print "Performing releasecheck on $tb\n"; 
     26{ 
     27    my $tdir = tempdir( CLEANUP => 1 ); 
     28    chdir $tdir or croak "Unable to change to temporary directory"; 
     29    print "Changing to temporary directory\n"; 
     30    my $ctarball = "$tdir/$tb"; 
     31    copy "$cwd/$tb" => $ctarball 
     32        or croak "Unable to copy $tb"; 
     33    system(qq{tar xzf $ctarball}) 
     34        and croak "Unable to untar $ctarball"; 
     35    chdir $distro or croak "Unable to chdir to $distro"; 
     36    print "Reconfiguring\n"; 
     37    system(qq{$^X Configure.pl --silent}) and croak "Unable to configure"; 
     38    print "Rebuilding\n"; 
     39    system(qq{make --silent}) and croak "Unable to build"; 
     40    print "Retesting\n"; 
     41    system(qq{make test}) and croak "'make test' did not complete successfully"; 
     42    print "Rereleasing\n"; 
     43    system(qq{make release --silent}) and croak "Unable to release"; 
     44    print "Recleaning\n"; 
     45    system(qq{make realclean --silent}) and croak "Unable to realclean"; 
     46    chdir $cwd or croak "Unable to change dir back"; 
     47    print "Leaving temporary directory\n"; 
     48} 
     49print "Completed releasecheck on $tb\n";