added script for kdoc upload to github pages to fix KT-1450
This commit is contained in:
@@ -13,3 +13,4 @@ PluginVerifier
|
||||
tmp
|
||||
*TestMy.java
|
||||
.*.swp
|
||||
gh-pages
|
||||
|
||||
@@ -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
@@ -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"
|
||||
Reference in New Issue
Block a user