-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmake_docs.sh
executable file
·42 lines (32 loc) · 1 KB
/
make_docs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
#====================================================
# Author: J. V. Cardenzana
# Description:
# This script is intended to generate the online
# documentation from whatever code branch it is
# run from and push those changes to the server.
#====================================================
UpdateDocs()
{
# Get the current branch name
declare curBranch=$(git rev-parse --abbrev-ref HEAD)
# Checkout the gh-pages branch
git checkout gh-pages
# Merge changes from the previous branch
git merge $curBranch
# Delete all of the documentation information
git rm -r documentation/html
rm -r documentation/html
# Re-make the documentation
doxygen
# Add the html documentation to the repository
git add -f documentation/html
# Commit the documentation
git commit -a -m "Updated documentation from the ${curBranch} branch."
# Push the changes
git pull
git push
# Finally switch back to the original branch
git checkout $curBranch
}
UpdateDocs