added script for kdoc upload to github pages to fix KT-1450

This commit is contained in:
James Strachan
2012-03-01 14:38:13 +00:00
parent bee4704358
commit 6315c03ea8
3 changed files with 30 additions and 0 deletions
+1
View File
@@ -13,3 +13,4 @@ PluginVerifier
tmp
*TestMy.java
.*.swp
gh-pages
+10
View File
@@ -131,6 +131,16 @@
<arg value="-docOutput"/>
<arg value="${output}/apidoc/stdlib"/>
</java>
<fail message="No stdlib API docs generated.">
<condition>
<not>
<resourcecount count="1">
<fileset id="fs" dir="${output}/apidoc/stdlib" includes="index.html"/>
</resourcecount>
</not>
</condition>
</fail>
</target>
<target name="compileTestlib" depends="compileKunit">
Executable
+19
View File
@@ -0,0 +1,19 @@
#!/bin/sh
# generates the API docs and uploads them to github pages
# for help on github pages see: http://pages.github.com/
# TODO can we fail the build if the docs are not created?
ant doc || exit $?
echo "Cloning/pulling latest gh-pages branch"
git clone -b gh-pages git@github.com:JetBrains/kotlin.git gh-pages
cd gh-pages
git pull || exit $?
rm -rf apidoc/stdlib/*
cp -r ../dist/apidoc/* apidoc
git add apidoc || exit $?
git commit -m "latest apidocs" || exit $?
git push || exit $?
echo "Updated github pages for apidocs"