Skip to content

Commit

Permalink
travis-doxygen.sh: allow overriding GitHub repo from environment
Browse files Browse the repository at this point in the history
  • Loading branch information
pah committed Jul 12, 2014
1 parent 2875b57 commit c1afdc8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ env:
- CONF=debug
- CONF=release
global:
- GITHUB_REPO='miloyip/rapidjson'
# prepare for 32/64 bit multi-arch support
- BITS=64
- secure: "HrsaCb+N66EG1HR+LWH1u51SjaJyRwJEDzqJGYMB7LJ/bfqb9mWKF1fLvZGk46W5t7TVaXRDD5KHFx9DPWvKn4gRUVkwTHEy262ah5ORh8M6n/6VVVajeV/AYt2C0sswdkDBDO4Xq+xy5gdw3G8s1A4Inbm73pUh+6vx+7ltBbk="
Expand Down
8 changes: 4 additions & 4 deletions build/travis-doxygen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ DOXYGEN_TAR=${DOXYGEN_VER}.linux.bin.tar.gz
DOXYGEN_URL="http://ftp.stack.nl/pub/users/dimitri/${DOXYGEN_TAR}"
DOXYGEN_BIN="/usr/local/bin/doxygen"

GHPAGES_REPO="miloyip/rapidjson"
GHPAGES_URL="https://github.com/${GHPAGES_REPO}"
: ${GITHUB_REPO:="miloyip/rapidjson"}
GITHUB_URL="https://github.com/${GITHUB_REPO}"

skip() {
echo "$@" 1>&2
Expand Down Expand Up @@ -61,7 +61,7 @@ gh_pages_prepare()
cd "${TRAVIS_BUILD_DIR}/doc";
[ ! -d "html" ] || \
abort "Doxygen target directory already exists."
git clone --single-branch -b gh-pages ${GHPAGES_URL} html
git clone --single-branch -b gh-pages ${GITHUB_URL} html
cd html
# setup git config (with defaults)
git config user.name "${GIT_NAME-travis}"
Expand Down Expand Up @@ -90,7 +90,7 @@ gh_pages_push() {
cd "${TRAVIS_BUILD_DIR}/doc/html";
# setup credentials (hide in "set -x" mode)
git config core.askpass 'bash -c ":"'
( set +x ; git config credential.${GHPAGES_URL}.username "${GH_TOKEN}" )
( set +x ; git config credential.${GITHUB_URL}.username "${GH_TOKEN}" )
# push to GitHub
git push origin gh-pages || \
skip "GitHub pages update failed, temporarily ignored."
Expand Down

0 comments on commit c1afdc8

Please sign in to comment.