Merge pull request #99 from pah/travis-ci

travis-doxygen.sh: only overwrite .git-credentials, iff not exists
This commit is contained in:
Milo Yip 2014-08-11 16:11:41 +08:00
commit 34dd0fd68f

View File

@ -107,9 +107,9 @@ gh_pages_push() {
git remote set-url --push origin "${GITHUB_URL}"
git config credential.helper 'store'
# ( set +x ; git config credential.username "${GH_TOKEN}" )
( set +x ; \
echo "https://${GH_TOKEN}:@${GITHUB_HOST}" > ${HOME}/.git-credentials ; \
chmod go-rw ${HOME}/.git-credentials )
( set +x ; [ -f ${HOME}/.git-credentials ] || \
( echo "https://${GH_TOKEN}:@${GITHUB_HOST}" > ${HOME}/.git-credentials ; \
chmod go-rw ${HOME}/.git-credentials ) )
# push to GitHub
git push origin gh-pages
}