travis-doxygen.sh: allow overriding GitHub repo from environment
This commit is contained in:
parent
2875b57616
commit
c1afdc8df2
@ -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="
|
||||
|
@ -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
|
||||
@ -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}"
|
||||
@ -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."
|
||||
|
Loading…
x
Reference in New Issue
Block a user