Disable per-components mode for cabal-spec version < 1.8
[cabal.git] / travis-deploy.sh
blob7bdb7587f3d601980824ae1fb21de04849f6d014
1 #!/bin/sh
2 set -ex
4 deploy() {
5 git config --global user.email "builds@travis-ci.org"
6 git config --global user.name "Travis CI User"
7 git clone https://github.com/haskell/cabal-website.git cabal-website
8 (cd cabal-website && git checkout --track -b gh-pages origin/gh-pages)
9 rm -rf cabal-website/doc
10 mkdir -p cabal-website/doc/html
11 mv dist-newstyle/build/Cabal-1.25.0.0/doc/html/Cabal \
12 cabal-website/doc/html/Cabal
13 (cd cabal-website && git add --all .)
14 (cd cabal-website && \
15 git commit --amend --reset-author -m "Deploy to GitHub ($(date)).")
16 (cd cabal-website && \
17 git push --force git@github.com:haskell/cabal-website.git \
18 gh-pages:gh-pages)
21 if [ "x$TRAVIS_REPO_SLUG" = "xhaskell/cabal" \
22 -a "x$TRAVIS_PULL_REQUEST" = "xfalse" \
23 -a "x$TRAVIS_BRANCH" = "xmaster" \
24 -a "x$DEPLOY_DOCS" = "xYES" ]
25 then
26 deploy