-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,26 @@ | ||
#!/bin/bash | ||
set -x | ||
|
||
TMP_FOLDER="../temp_jdoc" | ||
|
||
# Build the docs | ||
./gradlew clean javaDoc | ||
mkdir ../temp_jdoc | ||
cp -r build/docs/javadoc/* ../temp_jdoc | ||
# Folder to copy docs into | ||
mkdir $TMP_FOLDER | ||
# Copy them out of the repo | ||
cp -r build/docs/javadoc/* $TMP_FOLDER | ||
# Switch to correct branch | ||
git checkout gh-pages | ||
# Replace old docs with newly built ones | ||
rm -rf * | ||
cp -r ../temp_jdoc/* . | ||
cp -r TMP_FOLDER . | ||
# Commit to the gh-pages branch | ||
git add . | ||
git commit -m 'Update javadoc' | ||
git push | ||
git checkout master | ||
|
||
rm -rf ../temp_jdoc | ||
# Clean up | ||
git checkout master | ||
rm -rf $TMP_FOLDER | ||
|
||
echo "JavaDocs update was successful!" |