From 4b850942b38e033f199a8f4f3252c0dccd2ea552 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 20 May 2024 09:16:04 +0200 Subject: [PATCH 01/12] Add actions job for building documentation PDF --- .github/workflows/tests.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9ede484d..f31afd13 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,13 +5,15 @@ on: branches: - master - '[34].[0-9]+.x' + - actions/build_pdf pull_request: branches: - master - '[34].[0-9]+.x' jobs: - build: + build-dev-docs: + name: 'Build development docs' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -31,3 +33,21 @@ jobs: run: | cd development make html + + build-user-docs-pdf: + name: 'Build user docs PDF' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install fop + run: | + sudo apt-get install -y fop + - name: Build pdf documentation + working-directory: ${{ github.workspace }}/documentation + run: | + ./create_pdf.sh + - name: Archive PDF output + uses: actions/upload-artifact@v4 + with: + name: Documentation PDF + path: ${{ github.workspace }}/documentation/*.pdf From ca97426202ac92f919b3e7fbd6bef1505c3307b5 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 20 May 2024 09:16:32 +0200 Subject: [PATCH 02/12] Remove doctype as this is no longer supported by FOP --- documentation/content/en/chapters/admin_guide.xml | 2 -- documentation/content/en/chapters/glossary.xml | 2 -- documentation/content/en/chapters/moderator_guide.xml | 2 -- documentation/content/en/chapters/quick_start_guide.xml | 2 -- documentation/content/en/chapters/server_guide.xml | 2 -- documentation/content/en/chapters/upgrade_guide.xml | 2 -- documentation/content/en/chapters/user_guide.xml | 4 +--- documentation/proteus_doc.xml | 6 ------ 8 files changed, 1 insertion(+), 21 deletions(-) diff --git a/documentation/content/en/chapters/admin_guide.xml b/documentation/content/en/chapters/admin_guide.xml index 96f3f84b..345c35c2 100644 --- a/documentation/content/en/chapters/admin_guide.xml +++ b/documentation/content/en/chapters/admin_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/en/chapters/glossary.xml b/documentation/content/en/chapters/glossary.xml index 528df848..6f4b64b2 100644 --- a/documentation/content/en/chapters/glossary.xml +++ b/documentation/content/en/chapters/glossary.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/en/chapters/moderator_guide.xml b/documentation/content/en/chapters/moderator_guide.xml index 7127396c..42b6b4f4 100644 --- a/documentation/content/en/chapters/moderator_guide.xml +++ b/documentation/content/en/chapters/moderator_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/en/chapters/quick_start_guide.xml b/documentation/content/en/chapters/quick_start_guide.xml index 84cab670..e74c753e 100644 --- a/documentation/content/en/chapters/quick_start_guide.xml +++ b/documentation/content/en/chapters/quick_start_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/en/chapters/server_guide.xml b/documentation/content/en/chapters/server_guide.xml index f41da88e..3e211c4c 100644 --- a/documentation/content/en/chapters/server_guide.xml +++ b/documentation/content/en/chapters/server_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/en/chapters/upgrade_guide.xml b/documentation/content/en/chapters/upgrade_guide.xml index 6d934bf0..fdaff09d 100644 --- a/documentation/content/en/chapters/upgrade_guide.xml +++ b/documentation/content/en/chapters/upgrade_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/en/chapters/user_guide.xml b/documentation/content/en/chapters/user_guide.xml index 75e4ae54..b71b9ec7 100644 --- a/documentation/content/en/chapters/user_guide.xml +++ b/documentation/content/en/chapters/user_guide.xml @@ -1,6 +1,4 @@ - @@ -421,7 +419,7 @@ Drafts When creating a post, it can be saved or loaded using the drafts feature. If the board permissions allow drafts to be saved, then Save and Load buttons will appear on the posting page. - Save - Saves a post as a draft. When a draft is saved, only the subject and message of the post are stored. Topic icons, attachments, etc… will be lost. + Save - Saves a post as a draft. When a draft is saved, only the subject and message of the post are stored. Topic icons, attachments, etc... will be lost. Load - Loads a saved draft. When clicked, a listing of available drafts will appear. Click the title of the desired post to load the draft. Any information in the current post will be lost and replaced with that of the draft. Once a draft is used, it is removed. For more information on managing drafts, please see UCP Drafts. diff --git a/documentation/proteus_doc.xml b/documentation/proteus_doc.xml index 45343fc5..b7cbc825 100644 --- a/documentation/proteus_doc.xml +++ b/documentation/proteus_doc.xml @@ -1,10 +1,4 @@ - - %xinclude; - - ]> phpBB 3.3 <emphasis>Proteus</emphasis> Documentation From f3c760b1e420a08613353f1534f3d1122e30cb29 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 20 May 2024 09:16:48 +0200 Subject: [PATCH 03/12] Make create_pdf.sh executable --- documentation/create_pdf.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 documentation/create_pdf.sh diff --git a/documentation/create_pdf.sh b/documentation/create_pdf.sh old mode 100644 new mode 100755 From 37b1db383baf748ff0c4123926739b8d569e6af8 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 20 May 2024 09:17:02 +0200 Subject: [PATCH 04/12] Add simple sanity check to script --- documentation/create_pdf.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/documentation/create_pdf.sh b/documentation/create_pdf.sh index d67f8383..46439462 100755 --- a/documentation/create_pdf.sh +++ b/documentation/create_pdf.sh @@ -1,7 +1,9 @@ #!/bin/bash echo "Removing previous PDF" -rm proteus_doc.pdf +if [ -f proteus_doc.pdf ]; then + rm proteus_doc.pdf +fi echo "Creating new PDF" fop -xml proteus_doc.xml -xsl xsl/proteus_pdf.xsl -pdf proteus_doc.pdf From 3f08f10cca56ba5debe2bb628b80be93436ded8a Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 20 May 2024 09:17:39 +0200 Subject: [PATCH 05/12] Ignore .idea folder --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 789caf07..7114a1b4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ Thumbs.db .DS_Store +.idea/ /development/_build /documentation/build From 15976eb62d48774f203961f2759bd40d1626dbb1 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 20 May 2024 09:18:57 +0200 Subject: [PATCH 06/12] Remove PR branch from actions file --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f31afd13..4fe9e7c0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,7 +5,6 @@ on: branches: - master - '[34].[0-9]+.x' - - actions/build_pdf pull_request: branches: - master From 7aa01020a2a4839d8bb7df947ba2fe470388b006 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 20 May 2024 09:24:20 +0200 Subject: [PATCH 07/12] Remove doctype from other languages' chapters --- documentation/content/cs/chapters/admin_guide.xml | 1 - documentation/content/cs/chapters/glossary.xml | 1 - documentation/content/cs/chapters/moderator_guide.xml | 2 -- documentation/content/cs/chapters/quick_start_guide.xml | 2 -- documentation/content/cs/chapters/upgrade_guide.xml | 2 -- documentation/content/cs/chapters/user_guide.xml | 2 -- documentation/content/da/chapters/admin_guide.xml | 2 -- documentation/content/da/chapters/glossary.xml | 2 -- documentation/content/da/chapters/moderator_guide.xml | 2 -- documentation/content/da/chapters/quick_start_guide.xml | 2 -- documentation/content/da/chapters/upgrade_guide.xml | 2 -- documentation/content/da/chapters/user_guide.xml | 2 -- documentation/content/de/chapters/glossary.xml | 1 - documentation/content/hu/chapters/admin_guide.xml | 2 -- documentation/content/hu/chapters/glossary.xml | 2 -- documentation/content/hu/chapters/moderator_guide.xml | 2 -- documentation/content/hu/chapters/quick_start_guide.xml | 2 -- documentation/content/hu/chapters/upgrade_guide.xml | 2 -- documentation/content/hu/chapters/user_guide.xml | 2 -- documentation/content/nl/chapters/admin_guide.xml | 2 -- documentation/content/nl/chapters/glossary.xml | 2 -- documentation/content/nl/chapters/moderator_guide.xml | 2 -- documentation/content/nl/chapters/quick_start_guide.xml | 2 -- documentation/content/nl/chapters/upgrade_guide.xml | 2 -- documentation/content/nl/chapters/user_guide.xml | 2 -- documentation/content/pl/admin_guide.xml | 2 -- documentation/content/pl/glossary.xml | 2 -- documentation/content/pl/moderator_guide.xml | 2 -- documentation/content/pl/quick_start_guide.xml | 2 -- documentation/content/pl/upgrade_guide.xml | 2 -- documentation/content/pl/user_guide.xml | 2 -- 31 files changed, 59 deletions(-) diff --git a/documentation/content/cs/chapters/admin_guide.xml b/documentation/content/cs/chapters/admin_guide.xml index f43dcdd4..ab6ccda1 100644 --- a/documentation/content/cs/chapters/admin_guide.xml +++ b/documentation/content/cs/chapters/admin_guide.xml @@ -1,5 +1,4 @@ - diff --git a/documentation/content/cs/chapters/glossary.xml b/documentation/content/cs/chapters/glossary.xml index 702279c1..7345aa98 100644 --- a/documentation/content/cs/chapters/glossary.xml +++ b/documentation/content/cs/chapters/glossary.xml @@ -1,5 +1,4 @@ - diff --git a/documentation/content/cs/chapters/moderator_guide.xml b/documentation/content/cs/chapters/moderator_guide.xml index ef7e3a5c..27e8e6c9 100644 --- a/documentation/content/cs/chapters/moderator_guide.xml +++ b/documentation/content/cs/chapters/moderator_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/cs/chapters/quick_start_guide.xml b/documentation/content/cs/chapters/quick_start_guide.xml index f6cb1691..9eae896e 100644 --- a/documentation/content/cs/chapters/quick_start_guide.xml +++ b/documentation/content/cs/chapters/quick_start_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/cs/chapters/upgrade_guide.xml b/documentation/content/cs/chapters/upgrade_guide.xml index 43a7e08e..5bf58c6d 100644 --- a/documentation/content/cs/chapters/upgrade_guide.xml +++ b/documentation/content/cs/chapters/upgrade_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/cs/chapters/user_guide.xml b/documentation/content/cs/chapters/user_guide.xml index 22da96ee..612f564b 100644 --- a/documentation/content/cs/chapters/user_guide.xml +++ b/documentation/content/cs/chapters/user_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/da/chapters/admin_guide.xml b/documentation/content/da/chapters/admin_guide.xml index 8330c0ed..bcac3f06 100644 --- a/documentation/content/da/chapters/admin_guide.xml +++ b/documentation/content/da/chapters/admin_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/da/chapters/glossary.xml b/documentation/content/da/chapters/glossary.xml index 179855e0..d0bd2cbe 100644 --- a/documentation/content/da/chapters/glossary.xml +++ b/documentation/content/da/chapters/glossary.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/da/chapters/moderator_guide.xml b/documentation/content/da/chapters/moderator_guide.xml index 3712b8b6..82bb2718 100644 --- a/documentation/content/da/chapters/moderator_guide.xml +++ b/documentation/content/da/chapters/moderator_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/da/chapters/quick_start_guide.xml b/documentation/content/da/chapters/quick_start_guide.xml index 11dd86e6..0a41e6eb 100644 --- a/documentation/content/da/chapters/quick_start_guide.xml +++ b/documentation/content/da/chapters/quick_start_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/da/chapters/upgrade_guide.xml b/documentation/content/da/chapters/upgrade_guide.xml index 381cb140..27b0afa8 100644 --- a/documentation/content/da/chapters/upgrade_guide.xml +++ b/documentation/content/da/chapters/upgrade_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/da/chapters/user_guide.xml b/documentation/content/da/chapters/user_guide.xml index 0102c843..ebd308b4 100644 --- a/documentation/content/da/chapters/user_guide.xml +++ b/documentation/content/da/chapters/user_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/de/chapters/glossary.xml b/documentation/content/de/chapters/glossary.xml index aa94d711..cd5b40d4 100644 --- a/documentation/content/de/chapters/glossary.xml +++ b/documentation/content/de/chapters/glossary.xml @@ -1,5 +1,4 @@ - diff --git a/documentation/content/hu/chapters/admin_guide.xml b/documentation/content/hu/chapters/admin_guide.xml index 405a1202..b2d7816a 100644 --- a/documentation/content/hu/chapters/admin_guide.xml +++ b/documentation/content/hu/chapters/admin_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/hu/chapters/glossary.xml b/documentation/content/hu/chapters/glossary.xml index d7be9adb..2dd9b182 100644 --- a/documentation/content/hu/chapters/glossary.xml +++ b/documentation/content/hu/chapters/glossary.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/hu/chapters/moderator_guide.xml b/documentation/content/hu/chapters/moderator_guide.xml index 48efb461..b0c7dcf6 100644 --- a/documentation/content/hu/chapters/moderator_guide.xml +++ b/documentation/content/hu/chapters/moderator_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/hu/chapters/quick_start_guide.xml b/documentation/content/hu/chapters/quick_start_guide.xml index bacf6272..653545ce 100644 --- a/documentation/content/hu/chapters/quick_start_guide.xml +++ b/documentation/content/hu/chapters/quick_start_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/hu/chapters/upgrade_guide.xml b/documentation/content/hu/chapters/upgrade_guide.xml index cbd2b989..cbb3580a 100644 --- a/documentation/content/hu/chapters/upgrade_guide.xml +++ b/documentation/content/hu/chapters/upgrade_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/hu/chapters/user_guide.xml b/documentation/content/hu/chapters/user_guide.xml index 93dbed3d..f71131a4 100644 --- a/documentation/content/hu/chapters/user_guide.xml +++ b/documentation/content/hu/chapters/user_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/nl/chapters/admin_guide.xml b/documentation/content/nl/chapters/admin_guide.xml index 2e6f79e9..d18e86a4 100644 --- a/documentation/content/nl/chapters/admin_guide.xml +++ b/documentation/content/nl/chapters/admin_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/nl/chapters/glossary.xml b/documentation/content/nl/chapters/glossary.xml index fdd4a2ed..6cc0262a 100644 --- a/documentation/content/nl/chapters/glossary.xml +++ b/documentation/content/nl/chapters/glossary.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/nl/chapters/moderator_guide.xml b/documentation/content/nl/chapters/moderator_guide.xml index d01b992d..4a20dd20 100644 --- a/documentation/content/nl/chapters/moderator_guide.xml +++ b/documentation/content/nl/chapters/moderator_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/nl/chapters/quick_start_guide.xml b/documentation/content/nl/chapters/quick_start_guide.xml index 631f4877..19bd6e62 100644 --- a/documentation/content/nl/chapters/quick_start_guide.xml +++ b/documentation/content/nl/chapters/quick_start_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/nl/chapters/upgrade_guide.xml b/documentation/content/nl/chapters/upgrade_guide.xml index 51fb7ed3..59418bcb 100644 --- a/documentation/content/nl/chapters/upgrade_guide.xml +++ b/documentation/content/nl/chapters/upgrade_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/nl/chapters/user_guide.xml b/documentation/content/nl/chapters/user_guide.xml index e9c18a30..7899ffcc 100644 --- a/documentation/content/nl/chapters/user_guide.xml +++ b/documentation/content/nl/chapters/user_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/pl/admin_guide.xml b/documentation/content/pl/admin_guide.xml index 008a72dd..7e82ba1f 100644 --- a/documentation/content/pl/admin_guide.xml +++ b/documentation/content/pl/admin_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/pl/glossary.xml b/documentation/content/pl/glossary.xml index 5dd3abd7..b1c1655e 100644 --- a/documentation/content/pl/glossary.xml +++ b/documentation/content/pl/glossary.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/pl/moderator_guide.xml b/documentation/content/pl/moderator_guide.xml index ca32e93b..636d3777 100644 --- a/documentation/content/pl/moderator_guide.xml +++ b/documentation/content/pl/moderator_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/pl/quick_start_guide.xml b/documentation/content/pl/quick_start_guide.xml index 360a4291..6583d66a 100644 --- a/documentation/content/pl/quick_start_guide.xml +++ b/documentation/content/pl/quick_start_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/pl/upgrade_guide.xml b/documentation/content/pl/upgrade_guide.xml index 17540420..77591389 100644 --- a/documentation/content/pl/upgrade_guide.xml +++ b/documentation/content/pl/upgrade_guide.xml @@ -1,6 +1,4 @@ - diff --git a/documentation/content/pl/user_guide.xml b/documentation/content/pl/user_guide.xml index 81dcac9f..a8e02130 100644 --- a/documentation/content/pl/user_guide.xml +++ b/documentation/content/pl/user_guide.xml @@ -1,6 +1,4 @@ - From 86ab57b8df0cc44d3ba17aa3f3e2851e93a107c7 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 20 May 2024 09:25:06 +0200 Subject: [PATCH 08/12] Update actions version to v4 --- .github/workflows/tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4fe9e7c0..f2883641 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,9 +15,9 @@ jobs: name: 'Build development docs' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: '3.x' - name: Install dependencies @@ -37,7 +37,7 @@ jobs: name: 'Build user docs PDF' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install fop run: | sudo apt-get install -y fop From f6f76495ca127ff468d346b2063db91bba42fbc3 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 20 May 2024 09:31:51 +0200 Subject: [PATCH 09/12] Also check that building documentation for website works --- .github/workflows/tests.yml | 11 +++++++++++ documentation/create_docs.sh | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f2883641..73be43f7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -50,3 +50,14 @@ jobs: with: name: Documentation PDF path: ${{ github.workspace }}/documentation/*.pdf + + build-user-docs-website: + name: 'Build user docs for website' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build documentation for website + working-directory: ${{ github.workspace }}/documentation + run: | + mkdir build_website + ./create_pdf.sh build_website diff --git a/documentation/create_docs.sh b/documentation/create_docs.sh index b8be6ec1..9fce85ad 100755 --- a/documentation/create_docs.sh +++ b/documentation/create_docs.sh @@ -1,7 +1,7 @@ #!/bin/bash # set this to the correct path -path="/var/www/phpbb.com/htdocs/support/documentation/3.3" +path=${1:-'/var/www/phpbb.com/htdocs/support/documentation/3.3'} echo "Removing build directory" rm -rf build From e5d53df44e5b971b67cc8b4f3f91c1e6875f97e5 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 20 May 2024 09:33:40 +0200 Subject: [PATCH 10/12] Use correct call for creating website docs --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 73be43f7..10d43b32 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -60,4 +60,4 @@ jobs: working-directory: ${{ github.workspace }}/documentation run: | mkdir build_website - ./create_pdf.sh build_website + ./create_docs.sh build_website From 65db7cec51632a696e051a1bb11db732e4801abd Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 20 May 2024 09:34:54 +0200 Subject: [PATCH 11/12] Add missing xsltproc --- .github/workflows/tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 10d43b32..1b461d59 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -56,6 +56,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Install xsltproc + run: | + sudo apt-get install -y xsltproc - name: Build documentation for website working-directory: ${{ github.workspace }}/documentation run: | From 1eba9d66deece98de2f217df679e346b490533cb Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 20 May 2024 09:39:46 +0200 Subject: [PATCH 12/12] Ensure script exits with non-zero exit code on error --- documentation/create_docs.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/documentation/create_docs.sh b/documentation/create_docs.sh index 9fce85ad..53c7b394 100755 --- a/documentation/create_docs.sh +++ b/documentation/create_docs.sh @@ -8,8 +8,9 @@ rm -rf build echo "Creating docs" xsltproc --xinclude xsl/proteus_php.xsl proteus_doc.xml +exit_code=$? # Capture the exit code -if [ "$?" == "0" ]; then +if [ "$exit_code" == "0" ]; then echo "Successfully created documentation" echo "Removing $path" rm -rf $path @@ -24,3 +25,6 @@ if [ "$?" == "0" ]; then else echo "Failed creating documentation" fi + +# Output exit code +exit $exit_code