Script for updating javadocs

Affects issues:
- Close #993
This commit is contained in:
Rsl1122 2019-08-05 11:47:48 +03:00
parent 4fd473f804
commit e157c64eba

43
scripts/updateJavadocs.sh Executable file
View File

@ -0,0 +1,43 @@
echo "User permissions"
ls -l
echo "Moving to working directory:"
cd ../Plan
pwd
echo "Building javadocs with gradle"
./gradlew aggregateJavadocs
echo "Moving to working directory:"
cd ../
pwd
echo "Copying files to temporary folder.."
mkdir temp
mkdir temp/all
mkdir temp/api
cp -r Plan/build/docs/javadoc/* temp/all/
cp -r Plan/api/build/docs/javadoc/* temp/api/
echo "Changing to gh-pages branch"
git checkout gh-pages
echo "Removing old javadocs"
rm -rf all
rm -rf api
echo "Copying files to /all and /api"
mkdir all
mkdir api
cp -r temp/all/* ./all
cp -r temp/api/* ./api
echo "Cleaning up.."
rm -rf temp
git add .
git commit -m "Updated javadocs"
git push
echo "Changing back to previous branch"
git checkout -
echo "Complete."