diff options
Diffstat (limited to 'Fu.sh')
-rw-r--r-- | Fu.sh | 22 |
1 files changed, 0 insertions, 22 deletions
@@ -1,22 +0,0 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | cabal configure && cabal build && cabal haddock --hyperlink-source \ | ||
3 | --html-location='/package/$pkg-version/docs' \ | ||
4 | --contents-location='/package/$pkg' | ||
5 | S=$? | ||
6 | if [ "${S}" -eq "0" ]; then | ||
7 | cd "dist/doc/html" | ||
8 | DDIR="${1}-${2}-docs" | ||
9 | cp -r "${1}" "${DDIR}" && tar -c -v -z --format=ustar -f "${DDIR}.tar.gz" "${DDIR}" | ||
10 | CS=$? | ||
11 | if [ "${CS}" -eq "0" ]; then | ||
12 | echo "Uploading to Hackageā¦" | ||
13 | curl -X PUT -H 'Content-Type: application/x-tar' -H 'Content-Encoding: gzip' --data-binary "@${DDIR}.tar.gz" "http://${3}:${4}@hackage.haskell.org/package/${1}-${2}/docs" | ||
14 | exit $? | ||
15 | else | ||
16 | echo "Error when packaging the documentation" | ||
17 | exit $CS | ||
18 | fi | ||
19 | else | ||
20 | echo "Error when trying to build the package." | ||
21 | exit $S | ||
22 | fi \ No newline at end of file | ||