Created
October 25, 2018 22:03
-
-
Save chessai/f2cfbc78110c55ae60b9de41e2d9cfd8 to your computer and use it in GitHub Desktop.
Sometimes haddocks fail to build, even when your package builds. This script will build and upload the haddocks for you, without needing to re-upload the package or do some weird revision stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
dir=$(mktemp -d dist-new-docs.XXXXXX) | |
trap 'rm -r "$dir"' EXIT | |
cabal new-haddock --builddir="$dir" --haddock-for-hackage --haddock-option=--hyperlinked-source | |
# Starting with cabal 2.0, `--publish` is needed for uploading to non-candidate releases | |
cabal upload --publish -d $dir/*-docs.tar.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment