Plan/scripts/updateJavadocs.sh
Rsl1122 e157c64eba Script for updating javadocs
Affects issues:
- Close #993
2019-08-05 11:47:48 +03:00

44 lines
743 B
Bash
Executable File

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."