cgal/Packages/Release/release_scripts/make_public_release

76 lines
2.2 KiB
Perl
Executable File

#!/usr/bin/perl -w
my ($major,$minor) = (3,0);
#my $release_date_option = "-d '2000, January 11'";
my $release_date_option = "";
my $explanation=<<'EOF';
What to do to make a public release
Take the latest internal release. Unpack it and go to its main directory.
Alter the second line above, such that the major and minor release
number are ok.
Run this script. This does the following:
Remove the test directory.
Remove developer_scripts dir
Remove doc_tex dir
Remove winutils dir
Remove top-level maintainer file
Remove examples/*/cgal_test, demo/*/cgal_test,
examples/*/version demo/*/version
Find all .C and .h files and collect them in a file
Edit include/CGAL/config.h
#define CGAL_VERSION ...
#define CGAL_VERSION_NR ...
The rest is done manually still.
Edit install_cgal script: remove the "y" in INTERNAL_RELEASE='y'.
Rename the current directory to CGAL-x.y.
Do
find CGAL-x.y -exec touch 01221530 {} \;
in order to touch all files (Here the date/time Jan 22, 15:30 was used
as an example)
Make CGAL-x.y.tar.gz with tar and gzip and CGAL-x.y.zip with zip.
The documentation goes separately from the rest, except for the installation
manual.
EOF
die if $major >= 1000;
die if $major < 1;
die if $minor >= 1000;
die if $minor < 0;
die "Quitting: No include/CGAL directory under current directory\n"
if (! -d 'include/CGAL' );
system ("rm -rf test");
system ("rm -rf developer_scripts");
system ("rm -rf doc_tex");
system ("rm -rf winutils");
system ("rm -f maintainer");
system ("rm -f examples/*/cgal_test");
system ("rm -f demo/*/cgal_test");
system ("rm -f examples/*/version");
system ("rm -f demo/*/version");
system("find . -name '*.[hC]' -print > filenames");
unlink 'filenames';
my $version_nr = sprintf "1%03d%03d100",$major,$minor;
my $config_file = 'include/CGAL/config.h';
die if ! -r $config_file;
open TMPFILE, ">tmp_config$$";
open CONFIGFILE, "$config_file";
while (<CONFIGFILE>) {
if (/\s*#define\s+CGAL_VERSION\s/) {
print TMPFILE "#define CGAL_VERSION ${major}.${minor}\n";
} elsif (/\s*#define\s+CGAL_VERSION_NR\s/) {
print TMPFILE "#define CGAL_VERSION_NR $version_nr\n";
} else {
print TMPFILE $_;
}
}
close CONFIGFILE;
close TMPFILE;
rename "tmp_config$$", "$config_file";
#print $explanation;