Lines Matching +full:- +full:- +full:head +full:- +full:repository
5 # - Packages doxygen doxygen-doc doxygen-latex doxygen-gui graphviz
7 # - Doxygen configuration file must have the destination directory empty and
9 # - A gh-pages branch should already exist.
12 # - DOXYFILE : The Doxygen configuration file.
13 # - GH_REPO_NAME : The name of the repository.
14 # - GH_REPO_REF : The GitHub reference to the repository.
15 # - GH_REPO_TOKEN : The GitHub application token.
18 # the gh-pages branch of a repository specified by GH_REPO_REF.
19 # Before this script is used there should already be a gh-pages branch in the
20 # repository.
25 ##### Setup this script and get the current gh-pages branch. #####
28 set -e
34 usage() { echo "Usage: `basename $0` options (-n value) (-r value) (-t value)" 1>&2; exit 1; }
57 shift $((OPTIND - 1))
59 [ -n "$GH_REPO_NAME" ] || {
60 echo "ERROR: -n GH_REPO_NAME is not defined" >/dev/stderr
64 [ -n "$GH_REPO_REF" ] || {
65 echo "ERROR: -r GH_REPO_REF is not defined" >/dev/stderr
69 [ -n "$GH_REPO_TOKEN" ] || {
70 echo "ERROR: -t GH_REPO_TOKEN is not defined" >/dev/stderr
75 ##### Upload the documentation to the gh-pages branch of the repository. #####
79 if [ -d "html-out" ] && [ -f "html-out/index.html" ]; then
85 # Get the current gh-pages branch
86 git clone -b gh-pages https://git@$GH_REPO_REF
91 git config --global push.default simple
93 # Remove everything currently in the gh-pages branch.
95 # stayed the same and will only update the changed files. So the gh-pages branch
98 CURRENTCOMMIT=`git rev-parse HEAD`
99 git reset --hard `git rev-list HEAD | tail -n 1` # Reset working tree to initial commit
100 git reset --soft $CURRENTCOMMIT # Move HEAD back to where it was
102 # Move doxy files into local gh-pages branch folder
103 mv ../../html-out/* .
106 # to be seen on the gh-pages site. Therefore creating an empty .nojekyll file.
111 echo 'Uploading documentation to the gh-pages branch...'
113 # gh-pages branch.
116 git add --all
120 git commit -m "Deploy code docs to GitHub Pages"
122 # Force push to the remote gh-pages branch.
125 git push --force "https://${GH_REPO_TOKEN}@${GH_REPO_REF}" > /dev/null 2>&1