summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormozilla%colinogilvie.co.uk <>2006-07-20 06:37:44 +0200
committermozilla%colinogilvie.co.uk <>2006-07-20 06:37:44 +0200
commit7b7974745ec094f0db9bc42bf0025657ae77df65 (patch)
tree8777d529200a6a2f686d2e9456a356cdf7918455
parent439114b135b22bd4d1ea98d8c3e6c102806ebf1c (diff)
downloadbugzilla-7b7974745ec094f0db9bc42bf0025657ae77df65.tar.gz
bugzilla-7b7974745ec094f0db9bc42bf0025657ae77df65.tar.xz
Bug 344731: Update documentation minimum versions automatically
Patch by Colin Ogilvie <colin.ogilvie@gmail.com>; r=mkanat; a=myk
-rw-r--r--docs/makedocs.pl41
-rw-r--r--docs/xml/Bugzilla-Guide.xml33
2 files changed, 44 insertions, 30 deletions
diff --git a/docs/makedocs.pl b/docs/makedocs.pl
index 5a001ea06..871fb3370 100644
--- a/docs/makedocs.pl
+++ b/docs/makedocs.pl
@@ -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;
diff --git a/docs/xml/Bugzilla-Guide.xml b/docs/xml/Bugzilla-Guide.xml
index 1ed005807..404c62149 100644
--- a/docs/xml/Bugzilla-Guide.xml
+++ b/docs/xml/Bugzilla-Guide.xml
@@ -1,4 +1,8 @@
-<!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">
-
]>