Skip to content

Commit 0992c95

Browse files
author
Andrew Elder
committed
publish_doxygen: config git user and email (not working)
1 parent 3e35410 commit 0992c95

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

publish_doxygen.sh

+24-6
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,38 @@
44
REPO_PATH=https://github.com/audioscience/avdecc-lib.git
55
BUILD_PATH=build-doc
66
HTML_PATH=doc/public_lib
7-
COMMIT_USER="Documentation Builder"
8-
COMMIT_EMAIL="[email protected]"
7+
8+
9+
##### Configure git.
10+
# Set the push default to simple i.e. push only the current branch.
11+
git config --global push.default simple
12+
# Pretend to be an user called Travis CI.
13+
git config --global user.name "Travis CI"
14+
git config --global user.email "[email protected]"
915

1016
# Pull the HTML repo
1117
mkdir -p ${BUILD_PATH}
1218
git clone -b gh-pages "${REPO_PATH}" --single-branch ${BUILD_PATH}
19+
echo "After clone"
20+
pwd
21+
ls
1322

1423
# Create HTML directory
1524
cd ${BUILD_PATH}
1625
mkdir -p ${HTML_PATH}
26+
echo "After mkdir build path"
1727
cd -
28+
ls ${BUILD_PATH}
1829

30+
##### Generate the Doxygen code documentation and log the output. #####
31+
echo 'Generating Doxygen code documentation...'
1932
doxygen Doxyfile-public_lib
2033

2134
# Create and commit the documentation repo.
2235
cd ${BUILD_PATH}
36+
echo "After cd build path"
37+
pwd
38+
ls
2339
################################################################################
2440
##### Upload the documentation to the gh-pages branch of the repository. #####
2541
# Only upload if Doxygen successfully created the documentation.
@@ -41,11 +57,13 @@ if [ -d "${HTML_PATH}/html" ] && [ -f "${HTML_PATH}/html/index.html" ]; then
4157
# Force push to the remote gh-pages branch.
4258
# The ouput is redirected to /dev/null to hide any sensitive credential data
4359
# that might otherwise be exposed.
44-
git push --force "https://${GH_REPO_TOKEN}@github.com/audioscience/avdecc-lib.git" > /dev/null 2>&1
60+
61+
# Don't have authentication figured out at this point.
62+
echo 'push to github here - if it worked'
63+
#git push --force https://andrew-elder:${GH_AVDECC_TOKEN}@github.com/audioscience/avdecc-lib.git
4564
else
46-
echo '' >&2
47-
echo 'Warning: No documentation (html) files have been found!' >&2
48-
echo 'Warning: Not going to push the documentation to GitHub!' >&2
65+
echo 'Warning: No documentation (html) files have been found!'
66+
echo 'Warning: Not going to push the documentation to GitHub!'
4967
exit 1
5068
fi
5169
cd -

0 commit comments

Comments
 (0)