Bug 344731: Update documentation minimum versions automatically

Patch by Colin Ogilvie <colin.ogilvie@gmail.com>; r=mkanat; a=myk
parent 439114b1
......@@ -20,6 +20,7 @@
#
# Contributor(s): Matthew Tuck <matty@chariot.net.au>
# Jacob Steenhagen <jake@bugzilla.org>
# Colin Ogilvie <colin.ogilvie@gmail.com>
# This script compiles all the documentation.
......@@ -27,6 +28,44 @@ use diagnostics;
use strict;
use File::Basename;
use lib("..");
use Bugzilla::Install::Requirements qw (REQUIRED_MODULES OPTIONAL_MODULES);
use Bugzilla::Constants qw (DB_MODULE);
chdir dirname($0);
###############################################################################
# Generate minimum version list
###############################################################################
my $modules = REQUIRED_MODULES;
my $opt_modules = OPTIONAL_MODULES;
open(ENTITIES, '>', 'xml/bugzilla.ent') or die('Could not open xml/bugzilla.ent: ' . $!);
print ENTITIES '<?xml version="1.0"?>' ."\n\n";
print ENTITIES '<!-- Module Versions -->' . "\n";
foreach my $module (@$modules, @$opt_modules)
{
my $name = $module->{'name'};
$name =~ s/::/-/g;
$name = lc($name);
#This needs to be a string comparison, due to the modules having
#version numbers like 0.9.4
my $version = $module->{'version'} eq 0 ? 'any' : $module->{'version'};
print ENTITIES '<!ENTITY min-' . $name . '-ver "'.$version.'">' . "\n";
}
print ENTITIES "\n <!-- Database Versions --> \n";
my $db_modules = DB_MODULE;
foreach my $db (keys %$db_modules) {
my $name = $db_modules->{$db}->{'dbd'};
$name =~ s/::/-/g;
$name = lc($name);
my $version = $db_modules->{$db}->{'dbd_version'} eq 0 ? 'any' : $db_modules->{$db}->{'dbd_version'};
my $db_version = $db_modules->{$db}->{'db_version'};
print ENTITIES '<!ENTITY min-' . $name . '-ver "'.$version.'">' . "\n";
print ENTITIES '<!ENTITY min-' . lc($db) . '-ver "'.$db_version.'">' . "\n";
}
close(ENTITIES);
###############################################################################
# Environment Variable Checking
......@@ -67,8 +106,6 @@ sub MakeDocs {
# Make the docs ...
###############################################################################
chdir dirname($0);
if (!-d 'html') {
unlink 'html';
mkdir 'html', 0755;
......
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY % myents SYSTEM "bugzilla.ent">
%myents;
<!-- Include macros -->
<!ENTITY about SYSTEM "about.xml">
......@@ -41,35 +45,8 @@
<!ENTITY bzg-bugs "<ulink url='http://bugzilla.mozilla.org/enter_bug.cgi?product=Bugzilla&amp;component=Documentation'>Bugzilla Documentation</ulink>">
<!ENTITY mysql "http://www.mysql.com/">
<!-- For minimum versions -->
<!ENTITY min-mysql-ver "4.0.14">
<!ENTITY min-pg-ver "8.0.0">
<!ENTITY min-perl-ver "5.8.0">
<!ENTITY min-perl-ver-win "5.8.1">
<!ENTITY min-template-ver "2.08">
<!ENTITY min-file-temp-ver "any">
<!ENTITY min-appconfig-ver "1.52">
<!ENTITY min-text-wrap-ver "2001.0131">
<!ENTITY min-file-spec-ver "0.84">
<!ENTITY min-data-dumper-ver "any">
<!ENTITY min-dbd-mysql-ver "2.9003">
<!ENTITY min-dbd-pg-ver "1.45">
<!ENTITY min-dbi-ver "1.38">
<!ENTITY min-date-format-ver "2.21">
<!ENTITY min-cgi-ver "2.93">
<!ENTITY min-mail-mailer-ver "1.67">
<!ENTITY min-mime-base64-ver "3.01">
<!ENTITY min-mime-parser-ver "5.406">
<!ENTITY min-storable-ver "any">
<!-- Optional modules -->
<!ENTITY min-gd-ver "1.20">
<!ENTITY min-gd-graph-ver "any">
<!ENTITY min-gd-text-align-ver "any">
<!ENTITY min-chart-base-ver "1.0">
<!ENTITY min-xml-twig-ver "any">
<!ENTITY min-patchreader-ver "0.9.4">
<!ENTITY min-image-magick-ver "any">
]>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment