Ticket #1159: make.releasecheck.diff
File make.releasecheck.diff, 3.4 KB (added by jkeenan, 11 years ago) |
---|
-
MANIFEST
diff --git a/MANIFEST b/MANIFEST index c8e2cf0..3cc443d 100644
a b 2174 2174 tools/release/gen_release_info.pl [] 2175 2175 tools/release/inc_ver.pir [] 2176 2176 tools/release/release.json [] 2177 tools/release/releasecheck.pl [] 2177 2178 tools/release/templates.json [] 2178 2179 # Local variables: 2179 2180 # 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 55 55 # directory for developers' tools 56 56 # programs, templates, configuration files NOT invoked by 'make all' 57 57 DEV_TOOLS_DIR = tools/dev 58 RELEASE_TOOLS_DIR = tools/release 58 59 59 60 # directory for header files 60 61 INC_DIR = include/parrot … … 823 824 @echo "" 824 825 @echo "Release:" 825 826 @echo " release: Create a tarball." 827 @echo " release_check: Check that the tarball will build on its own." 826 828 @echo " win32-inno-installer: Create MSWin32 setup." 827 829 @echo "" 828 830 @echo "Examples:" … … 2915 2917 mv MANIFEST.real MANIFEST 2916 2918 rm parrot-$(VERSION) 2917 2919 2920 release_check: 2921 make release VERSION=$(SOVERSION) 2922 $(PERL) $(RELEASE_TOOLS_DIR)/releasecheck.pl 2923 2924 relcheck : release_check 2925 2918 2926 win32-inno-installer : world installable 2919 2927 $(PERL) $(DEV_TOOLS_DIR)/mk_inno.pl 2920 2928 $(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 2 use strict; 3 use warnings; 4 use Data::Dumper;$Data::Dumper::Indent=1; 5 use Carp; 6 use Cwd; 7 use File::Copy; 8 use File::Temp qw( tempdir ); 9 10 my $cwd = cwd(); 11 opendir my $DIRH, $cwd 12 or croak "Unable to open directory handle"; 13 my @tarballs = grep { m/parrot-.*\.tar\.gz$/ } readdir $DIRH; 14 closedir $DIRH or croak "Unable to close directory handle"; 15 croak "Should find exactly one gzipped tarball" 16 unless @tarballs == 1; 17 my $tb = $tarballs[0]; 18 my $distro = ''; 19 if ($tb =~ m/(parrot-\d+\.\d+\.\d+(?:-devel)?)\.tar\.gz$/ ) { 20 $distro = $1; 21 } 22 else { 23 croak "Unable to extract distro from $tb"; 24 } 25 print "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 } 49 print "Completed releasecheck on $tb\n";