Skip to content

Commit

Permalink
Clean up update-javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
basedrhys committed Jun 21, 2020
1 parent d521280 commit d5a06b1
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions update-javadocs.sh
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!"

0 comments on commit d5a06b1

Please sign in to comment.