Revert "Travis: remove before_install: let the latest build succeed (#19)"

This reverts commit aea1416c8a.
This commit is contained in:
Daniel Hahler 2016-05-18 00:17:34 +02:00
parent aea1416c8a
commit 4fd28e1639
1 changed files with 23 additions and 14 deletions

View File

@ -27,6 +27,29 @@ addons:
- libxcb-render-util0-dev - libxcb-render-util0-dev
- libxcb-image0-dev - libxcb-image0-dev
# Clone the awesomeWM.github.io repo before building, because we need the
# working copy to be there for updating already.
before_install:
- |
if [ -n "$GH_APIDOC_TOKEN" ]; then
set -e
git clone \
https://${GH_APIDOC_TOKEN}@github.com/awesomeWM/awesomeWM.github.io \
"$BUILD_WEB" 2>&1 | sed "s/$GH_APIDOC_TOKEN/GH_APIDOC_TOKEN/g"
if [ "$TRAVIS_PULL_REQUEST" = false ]; then
branch="$TRAVIS_BRANCH"
else
branch="pr-$TRAVIS_PULL_REQUEST"
fi
if [ "$branch" != master ]; then
cd $BUILD_WEB
if ! git checkout -b "$branch" "origin/$branch"; then
git checkout -b "$branch"
fi
cd -
fi
fi
install: install:
# libxcb-cursor-dev is not available in Ubuntu Ancient # libxcb-cursor-dev is not available in Ubuntu Ancient
- travis_retry wget --no-check-certificate https://xcb.freedesktop.org/dist/xcb-util-cursor-0.1.3.tar.bz2 -O /tmp/util-cursor.tar.bz2 - travis_retry wget --no-check-certificate https://xcb.freedesktop.org/dist/xcb-util-cursor-0.1.3.tar.bz2 -O /tmp/util-cursor.tar.bz2
@ -47,21 +70,7 @@ after_success:
if [ -n "$GH_APIDOC_TOKEN" ]; then if [ -n "$GH_APIDOC_TOKEN" ]; then
set -e set -e
commit_hash=$(git rev-parse --short HEAD) commit_hash=$(git rev-parse --short HEAD)
git clone \
https://${GH_APIDOC_TOKEN}@github.com/awesomeWM/awesomeWM.github.io \
"$BUILD_WEB" 2>&1 | sed "s/$GH_APIDOC_TOKEN/GH_APIDOC_TOKEN/g"
cd $BUILD_WEB cd $BUILD_WEB
if [ "$TRAVIS_PULL_REQUEST" = false ]; then
branch="$TRAVIS_BRANCH"
else
branch="pr-$TRAVIS_PULL_REQUEST"
fi
if [ "$branch" != master ]; then
if ! git checkout -b "$branch" "origin/$branch"; then
git checkout -b "$branch"
fi
fi
git config user.name "awesome-robot on Travis CI" git config user.name "awesome-robot on Travis CI"
git config user.email "awesome-robot@users.noreply.github.com" git config user.email "awesome-robot@users.noreply.github.com"
git add --all . git add --all .