git.iko.soy/typeable/servant
on typo help sign in
52 lines 898 B history raw
1SERVANT_DIR=/tmp/servant-client-gh-pages
3# Make a temporary clone
5rm -rf $SERVANT_DIR
7git clone . $SERVANT_DIR
9cd $SERVANT_DIR
11# Make sure to pull the latest
13git remote add haskell-servant git@github.com:haskell-servant/servant-client.git
15git fetch haskell-servant
17git reset --hard haskell-servant/gh-pages
19# Clear everything away
21git rm -rf $SERVANT_DIR/*
23# Switch back and build the haddocks
25cd -
27cabal configure --builddir=$SERVANT_DIR
29cabal haddock --hoogle --hyperlink-source --html-location='https://hackage.haskell.org/package/$pkg-$version/docs' --builddir=$SERVANT_DIR
31commit_hash=$(git rev-parse HEAD)
33# Move the HTML docs to the root
35cd $SERVANT_DIR
37rm *
38rm -rf build
39mv doc/html/servant-client/* .
40rm -r doc/
42# Add everything
44git add .
46git commit -m "Built from $commit_hash"
48# Push to update the pages
50git push haskell-servant HEAD:gh-pages
52rm -rf $SERVANT_DIR