mirror of
https://github.com/ilyakooo0/docker-hs.git
synced 2024-08-16 14:00:35 +03:00
Adds script for building docs.
It would be nice if stack did this automatically.
This commit is contained in:
parent
a97c404d98
commit
6b7c1d2a38
22
scripts/hackage-docs.sh
Executable file
22
scripts/hackage-docs.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Run this script in the top-level of your package directory
|
||||
# (where the .cabal file is) to compile documentation and
|
||||
# upload it to hackage.
|
||||
|
||||
# Requirements:
|
||||
# cabal-install-1.24 (for --for-hackage)
|
||||
# haddock 2.17 (for the hyperlinked source)
|
||||
|
||||
set -e
|
||||
|
||||
VERSION=`grep "^version:" docker.cabal | cut -d " " -f14`
|
||||
BUILDDIR=dist-newstyle/build/docker-$VERSION
|
||||
DOCSDIRNAME=docker-$VERSION-docs
|
||||
|
||||
cabal act-as-setup -- haddock --builddir=$BUILDDIR --for-hackage --hyperlink-sources
|
||||
cd $BUILDDIR/doc/html && tar --format=ustar -zcvf $DOCSDIRNAME.tar.gz $DOCSDIRNAME
|
||||
|
||||
echo NOW RUN: \n\n
|
||||
echo cabal upload -d $BUILDDIR/doc/html/$DOCSDIRNAME.tar.gz
|
||||
|
Loading…
Reference in New Issue
Block a user