From 4869d1dab0101944f5de2967b612e88eb1d1d207 Mon Sep 17 00:00:00 2001 From: John Ky Date: Wed, 13 Jan 2021 17:03:16 +1100 Subject: [PATCH] Fix haddock publishing --- .github/workflows/github-page.yml | 2 +- scripts/haddocs.sh | 19 +++++++++++++++---- scripts/prolog | 12 ++++++++++-- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/.github/workflows/github-page.yml b/.github/workflows/github-page.yml index 11061c89cdc..2c4e7312e70 100644 --- a/.github/workflows/github-page.yml +++ b/.github/workflows/github-page.yml @@ -27,7 +27,7 @@ jobs: echo "CABAL_BUILDDIR=$CABAL_BUILDDIR" >> $GITHUB_ENV - name: Set cache version - run: echo "CACHE_VERSION=myfzgX7" >> $GITHUB_ENV + run: echo "CACHE_VERSION=usE8bDW" >> $GITHUB_ENV - name: Add build script path run: echo "$(pwd)/.github/bin" >> $GITHUB_PATH diff --git a/scripts/haddocs.sh b/scripts/haddocs.sh index a9c7b007fbc..da0bcaefe44 100755 --- a/scripts/haddocs.sh +++ b/scripts/haddocs.sh @@ -40,12 +40,22 @@ HADDOCK_OPTS=( --haddock-hyperlink-source --haddock-option "--show-all" --haddock-option "--use-unicode" - --haddock-option "--use-contents=\"../index.html\"" + --disable-tests ) # build documentation of all modules if [ ${REGENERATE} == "true" ]; then - cabal haddock "${HADDOCK_OPTS[@]}" cardano-api + cabal haddock "${HADDOCK_OPTS[@]}" \ + cardano-api \ + cardano-api-test \ + cardano-cli \ + cardano-config \ + cardano-node \ + hedgehog-extras \ + exe:cardano-cli \ + exe:cardano-node \ + exe:cardano-node-chairman \ + exe:cardano-testnet elif [ ${REGENERATE} != "false" ]; then cabal haddock "${HADDOCK_OPTS[@]}" ${REGENERATE} fi @@ -67,7 +77,9 @@ done # --read-interface options interface_options () { for package in $(ls "${OUTPUT_DIR}"); do - echo "--read-interface=${package},${OUTPUT_DIR}/${package}/${package}.haddock" + if [ -f "${OUTPUT_DIR}/${package}/${package}.haddock" ]; then + echo "--read-interface=${package},${OUTPUT_DIR}/${package}/${package}.haddock" + fi done } @@ -80,7 +92,6 @@ haddock \ --gen-index \ --gen-contents \ --quickjump \ - --prolog ./scripts/prolog \ $(interface_options) # Assemble a toplevel `doc-index.json` from package level ones. diff --git a/scripts/prolog b/scripts/prolog index 2db7b3e5573..a427ee6ea6c 100644 --- a/scripts/prolog +++ b/scripts/prolog @@ -2,6 +2,14 @@ [skip to module list](#module-list) -This site contains Haskell documentation of +This site contains Haskell documentation of: -* __[Cardano API](cardano-api/Cardano-API.html)__ +* __[Cardano Api ](cardano-api/doc-index.html)__ +* __[Cardano Api-test ](cardano-api-test/doc-index.html)__ +* __[Cardano Cli ](cardano-cli/doc-index.html)__ +* __[Cardano Config ](cardano-config/doc-index.html)__ +* __[Cardano Node ](cardano-node/doc-index.html)__ +* __[Cardano Node ](cardano-node/doc-index.html)__ +* __[Cardano Node-chairman ](cardano-node-chairman/doc-index.html)__ +* __[Cardano Testnet ](cardano-testnet/doc-index.html)__ +* __[Hedgehog Extras ](hedgehog-extras/doc-index.html)__