-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #966 from geographika/clean-output
Clean repository when all languages are rebuilt
- Loading branch information
Showing
2 changed files
with
17 additions
and
6 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
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 |
---|---|---|
|
@@ -4,27 +4,38 @@ builddir=$1 | |
destdir=$2 | ||
sha=$3 | ||
|
||
# check the PDF was created and upload to https://mapserver.org/pdf/MapServer.pdf | ||
if [ -f $builddir/latex/en/MapServer.pdf ]; then | ||
set -x | ||
scp $builddir/latex/en/MapServer.pdf [email protected]:/var/www/mapserver.org/pdf/ | ||
set +x | ||
fi | ||
|
||
|
||
if [ ! -d $destdir/mapserver.github.io ]; then | ||
git clone [email protected]:mapserver/mapserver.github.io.git $destdir/mapserver.github.io | ||
fi | ||
|
||
# remove all previous files in the repo if [build_translations] | ||
# is in the commit message | ||
git log -n1 | grep -q "\\[build_translations\\]" | ||
|
||
if [[ $? -eq 0 ]]; then | ||
rm -rf "$destdir/mapserver.github.io"/* | ||
fi | ||
|
||
# copy in the newly created files | ||
cd $builddir/html | ||
cp -rf * $destdir/mapserver.github.io | ||
|
||
cd $destdir/mapserver.github.io | ||
|
||
# restore README.md and .nojekyll from the last commit | ||
git checkout HEAD -- README.md | ||
git checkout HEAD -- .nojekyll | ||
|
||
git config user.email "[email protected]" | ||
git config user.name "MapServer deploybot" | ||
|
||
#rm -rf _sources */_sources | ||
#rm -rf .doctrees */.doctrees */.buildinfo | ||
|
||
git add -A | ||
git commit -m "update with results of commit https://github.com/mapserver/MapServer-documentation/commit/$sha" | ||
git push origin master |