From c51274d1b6a85aeb8ecf1dfffcdc68a503ac3de9 Mon Sep 17 00:00:00 2001 From: David Steele Date: Thu, 16 May 2019 08:32:02 -0400 Subject: [PATCH] Add user guides for CentOS/RHEL 6/7. It would be better if the documentation could be generated on multiple operating systems all in one go, but the doc system currently does not allow vars to be changed once they are set. The solution is to run the docs for each required OS and stitch the documentation together. It's not pretty but it works and the automation in release.pl should at least make it easy to use. --- doc/manifest.xml | 4 +++- doc/release.pl | 35 ++++++++++++++++++++++++++++++----- doc/xml/index.xml | 4 ++-- doc/xml/metric.xml | 2 +- doc/xml/release.xml | 6 ++++++ doc/xml/user-guide-index.xml | 15 +++++++++++++++ doc/xml/user-guide.xml | 24 +++++++++++++++++------- 7 files changed, 74 insertions(+), 16 deletions(-) create mode 100644 doc/xml/user-guide-index.xml diff --git a/doc/manifest.xml b/doc/manifest.xml index d8f58548d..5bca4ebed 100644 --- a/doc/manifest.xml +++ b/doc/manifest.xml @@ -81,6 +81,7 @@ + @@ -93,7 +94,8 @@ - + + diff --git a/doc/release.pl b/doc/release.pl index 9f8e2314f..a79690280 100755 --- a/doc/release.pl +++ b/doc/release.pl @@ -164,7 +164,20 @@ eval &log(INFO, "Generate Debian/Ubuntu documentation"); executeTest("${strDocExe} --deploy", {bShowOutputAsync => true}); - executeTest("${strDocExe} --deploy --cache-only --out=man --out=html --var=project-url-root=index.html"); + + # Generate a full copy of the docs for review + &log(INFO, "Generate full documentation for review"); + + executeTest( + "${strDocExe} --deploy --cache-only --key-var=os-type=centos7 --include=user-guide --out=html" . + " --var=project-url-root=index.html"); + $oStorageDoc->move("$strDocHtml/user-guide.html", "$strDocHtml/user-guide-centos7.html"); + executeTest( + "${strDocExe} --deploy --out-preserve --cache-only --key-var=os-type=centos6 --out=html --include=user-guide" . + " --var=project-url-root=index.html"); + $oStorageDoc->move("$strDocHtml/user-guide.html", "$strDocHtml/user-guide-centos6.html"); + + executeTest("${strDocExe} --deploy --out-preserve --cache-only --out=man --out=html --var=project-url-root=index.html"); } if ($bDeploy) @@ -174,9 +187,16 @@ eval # Generate docs for the website history &log(INFO, 'Generate website ' . ($bDev ? 'dev' : 'history') . ' documentation'); - executeTest( - $strDocExe . ($bDev ? '' : ' --deploy --cache-only') . ' --out=html --var=project-url-root=index.html' . - ($bDev ? ' --dev --no-exe' : ' --exclude=release')); + my $strDocExeVersion = + ${strDocExe} . ($bDev ? ' --dev' : ' --deploy --cache-only') . ' --var=project-url-root=index.html --out=html'; + + executeTest("${strDocExeVersion} --key-var=os-type=centos7 --include=user-guide"); + $oStorageDoc->move("$strDocHtml/user-guide.html", "$strDocHtml/user-guide-centos7.html"); + executeTest("${strDocExeVersion} --out-preserve --key-var=os-type=centos6 --include=user-guide"); + $oStorageDoc->move("$strDocHtml/user-guide.html", "$strDocHtml/user-guide-centos6.html"); + + $oStorageDoc->remove("$strDocHtml/release.html"); + executeTest("${strDocExeVersion} --out-preserve --exclude=release"); # Deploy to repository &log(INFO, '...Deploy to repository'); @@ -189,7 +209,12 @@ eval { &log(INFO, "Generate website documentation"); - executeTest("${strDocExe} --deploy --cache-only --out=html"); + executeTest("${strDocExe} --deploy --cache-only --key-var=os-type=centos7 --include=user-guide --out=html"); + $oStorageDoc->move("$strDocHtml/user-guide.html", "$strDocHtml/user-guide-centos7.html"); + executeTest( + "${strDocExe} --deploy --out-preserve --cache-only --key-var=os-type=centos6 --include=user-guide --out=html"); + $oStorageDoc->move("$strDocHtml/user-guide.html", "$strDocHtml/user-guide-centos6.html"); + executeTest("${strDocExe} --deploy --out-preserve --cache-only --out=html"); # Deploy to repository &log(INFO, '...Deploy to repository'); diff --git a/doc/xml/index.xml b/doc/xml/index.xml index 32c61b6f0..98330a3f2 100644 --- a/doc/xml/index.xml +++ b/doc/xml/index.xml @@ -15,7 +15,7 @@ {[github-url-wiki]}#backlog http://www.pgbackrest.org - user-guide + user-guide-index configuration command release @@ -150,7 +150,7 @@

strives to be easy to configure and operate:

- User guide for {[user-guide-subtitle]} / {[pg-version]}. + User guides for various operating systems and versions. Command reference for command-line operations. Configuration reference for creating configurations. diff --git a/doc/xml/metric.xml b/doc/xml/metric.xml index b83020acb..2eb49b74b 100644 --- a/doc/xml/metric.xml +++ b/doc/xml/metric.xml @@ -1,7 +1,7 @@ ]> - !!! + {[project]} project metrics.
Code Coverage diff --git a/doc/xml/release.xml b/doc/xml/release.xml index 28b8d5063..0f310246c 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -195,6 +195,12 @@ + + +

Add user guides for CentOS/RHEL 6/7.

+
+
+

Automate coverage summary report generation.

diff --git a/doc/xml/user-guide-index.xml b/doc/xml/user-guide-index.xml new file mode 100644 index 000000000..0fa5b1e67 --- /dev/null +++ b/doc/xml/user-guide-index.xml @@ -0,0 +1,15 @@ + + + + List of available {[project]} user guides. + +
+ Available User Guides + + + {[os-debian-title]} / PostgreSQL {[os-debian-pg-version]} + {[os-centos7-title]} / PostgreSQL {[os-centos7-pg-version]} + {[os-centos6-title]} / PostgreSQL {[os-centos6-pg-version]} + +
+
diff --git a/doc/xml/user-guide.xml b/doc/xml/user-guide.xml index d3266c5a8..9edf3276d 100644 --- a/doc/xml/user-guide.xml +++ b/doc/xml/user-guide.xml @@ -10,6 +10,16 @@ centos6 centos7 + + Debian & Ubuntu + RHEL & CentOS 6 + RHEL & CentOS 7 + + + 10 + 9.5 + 9.6 + none @@ -27,9 +37,9 @@ centos:6 centos:7 - Debian & Ubuntu - RHEL & CentOS 6 - RHEL & CentOS 7 + {[os-debian-title]} + {[os-centos6-title]} + {[os-centos7-title]} Debian/Ubuntu RHEL/CentOS 6 @@ -44,9 +54,9 @@ /pgbackrest - 10 - 9.5 - 9.6 + {[os-debian-pg-version]} + {[os-centos6-pg-version]} + {[os-centos7-pg-version]} my $version = '{[pg-version]}'; $version =~ s/\.//g; return $version; 11 @@ -1130,7 +1140,7 @@ {[pg-cluster-check]} - could not find the database system + Failed to start PostgreSQL