Skip to content

Commit 3a2e29e

Browse files
committed
adding script to generate java and python docs and commit / push to gh-pages automagically
1 parent 463107e commit 3a2e29e

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

Diff for: generate_api_docs.sh

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Java
2+
./go javadocs || exit
3+
4+
# Python
5+
./go py_docs || exit
6+
7+
8+
# switch to gh-pages and copy the files
9+
git checkout gh-pages || exit
10+
rm -rf docs/api/java docs/api/py
11+
12+
mv build/javadoc docs/api/java
13+
mv build/docs/api/py docs/api/py
14+
15+
git add -A docs/api
16+
17+
echo "Do you want to commit the changes? (Y/n):"
18+
19+
read changes
20+
21+
if [ $changes != "" || $changes != "Y" || $changes != "y" ]
22+
then
23+
exit;
24+
fi
25+
26+
echo "Commiting changes"
27+
git commit -am "updating javadoc and py docs"
28+
29+
echo "pushing to origin gh-pages"
30+
git push origin gh-pages
31+
32+
echo "switching back to master branch"
33+
git checkout master

Diff for: py/build.desc

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ py_test(
7373
py_docs(
7474
name = "docs",
7575
source_folder = "py/docs/source",
76-
target_folder = "docs/api/py",
76+
target_folder = "build/docs/api/py",
7777
deps = [ "//py:test_env_docs" ]
7878
)
7979

0 commit comments

Comments
 (0)