Update build-and-upload-api-docs.sh.

Using the template at https://hackage.haskell.org/upload

It still fails because of a missing doc-index.json for Glob?
This commit is contained in:
John MacFarlane 2022-01-17 09:55:04 -08:00
parent 7f50324ff9
commit 5811baf80f

View file

@ -1,8 +1,8 @@
#!/bin/sh
set -e
dir=haddocks-dir
dir=$(mktemp -d dist-docs.XXXXXX)
trap 'rm -r "$dir"' EXIT
cabal v2-haddock --builddir="$dir" --haddock-for-hackage --haddock-hyperlinked-source
# Starting with cabal 2.0, `--publish` is needed for uploading to non-candidate releases
cabal upload -d $dir/*-docs.tar.gz
cabal v2-haddock --builddir="$dir" --haddock-for-hackage --enable-doc
cabal upload -d --publish $dir/*-docs.tar.gz