diff options
Diffstat (limited to 'scripts/pushdoc.sh')
-rw-r--r-- | scripts/pushdoc.sh | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/pushdoc.sh b/scripts/pushdoc.sh index bea97f0..34c811a 100644 --- a/scripts/pushdoc.sh +++ b/scripts/pushdoc.sh | |||
@@ -1,10 +1,14 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | set -e # exit with nonzero exit code if anything fails | 2 | set -e # exit with nonzero exit code if anything fails |
3 | 3 | ||
4 | # Build documentation | ||
4 | cabal haddock | 5 | cabal haddock |
5 | 6 | ||
6 | pushd dist/doc/html/hmacaroons | 7 | # Go to haddock output dir |
7 | git init | 8 | cd dist/doc/html/hmacaroons |
9 | |||
10 | # Quiet the git init message, since it's not useful in the build log | ||
11 | git init > /dev/null 2>&1 | ||
8 | 12 | ||
9 | # inside this git repo we'll pretend to be a new user | 13 | # inside this git repo we'll pretend to be a new user |
10 | git config user.name "Travis CI" | 14 | git config user.name "Travis CI" |
@@ -13,7 +17,9 @@ git config user.email "julien.tanguy@jhome.fr" | |||
13 | # The first and only commit to this new Git repo contains all the | 17 | # The first and only commit to this new Git repo contains all the |
14 | # files present with the commit message "Deploy to GitHub Pages". | 18 | # files present with the commit message "Deploy to GitHub Pages". |
15 | git add . | 19 | git add . |
16 | git commit -m "Deploy to GitHub Pages" | 20 | # Silence the commit too |
21 | git commit -m "Deploy to GitHub Pages" > /dev/null 2>&1 | ||
22 | |||
17 | 23 | ||
18 | # Force push from the current repo's master branch to the remote | 24 | # Force push from the current repo's master branch to the remote |
19 | # repo's gh-pages branch. (All previous history on the gh-pages branch | 25 | # repo's gh-pages branch. (All previous history on the gh-pages branch |
@@ -22,4 +28,4 @@ git commit -m "Deploy to GitHub Pages" | |||
22 | echo "Pushing haddock to gh-pages" | 28 | echo "Pushing haddock to gh-pages" |
23 | git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:gh-pages > /dev/null 2>&1 | 29 | git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:gh-pages > /dev/null 2>&1 |
24 | 30 | ||
25 | popd | 31 | cd ~/build/jtanguy/hmacaroons |