Skip to content

Commit

Permalink
publish_doxygen: config git user and email (not working)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Elder committed Apr 28, 2016
1 parent 3e35410 commit 0992c95
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions publish_doxygen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,38 @@
REPO_PATH=https://github.com/audioscience/avdecc-lib.git
BUILD_PATH=build-doc
HTML_PATH=doc/public_lib
COMMIT_USER="Documentation Builder"
COMMIT_EMAIL="aelder@audioscience.com"


##### Configure git.
# Set the push default to simple i.e. push only the current branch.
git config --global push.default simple
# Pretend to be an user called Travis CI.
git config --global user.name "Travis CI"
git config --global user.email "travis@travis-ci.org"

# Pull the HTML repo
mkdir -p ${BUILD_PATH}
git clone -b gh-pages "${REPO_PATH}" --single-branch ${BUILD_PATH}
echo "After clone"
pwd
ls

# Create HTML directory
cd ${BUILD_PATH}
mkdir -p ${HTML_PATH}
echo "After mkdir build path"
cd -
ls ${BUILD_PATH}

##### Generate the Doxygen code documentation and log the output. #####
echo 'Generating Doxygen code documentation...'
doxygen Doxyfile-public_lib

# Create and commit the documentation repo.
cd ${BUILD_PATH}
echo "After cd build path"
pwd
ls
################################################################################
##### Upload the documentation to the gh-pages branch of the repository. #####
# Only upload if Doxygen successfully created the documentation.
Expand All @@ -41,11 +57,13 @@ if [ -d "${HTML_PATH}/html" ] && [ -f "${HTML_PATH}/html/index.html" ]; then
# Force push to the remote gh-pages branch.
# The ouput is redirected to /dev/null to hide any sensitive credential data
# that might otherwise be exposed.
git push --force "https://${GH_REPO_TOKEN}@github.com/audioscience/avdecc-lib.git" > /dev/null 2>&1

# Don't have authentication figured out at this point.
echo 'push to github here - if it worked'
#git push --force https://andrew-elder:${GH_AVDECC_TOKEN}@github.com/audioscience/avdecc-lib.git
else
echo '' >&2
echo 'Warning: No documentation (html) files have been found!' >&2
echo 'Warning: Not going to push the documentation to GitHub!' >&2
echo 'Warning: No documentation (html) files have been found!'
echo 'Warning: Not going to push the documentation to GitHub!'
exit 1
fi
cd -

0 comments on commit 0992c95

Please sign in to comment.