From 6315c03ea86e12ac848f104dc41e80518fbd29db Mon Sep 17 00:00:00 2001 From: James Strachan Date: Thu, 1 Mar 2012 14:38:13 +0000 Subject: [PATCH] added script for kdoc upload to github pages to fix KT-1450 --- .gitignore | 1 + build.xml | 10 ++++++++++ updatedoc.sh | 19 +++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100755 updatedoc.sh diff --git a/.gitignore b/.gitignore index 8648ec99ad4..1c31ea4d24c 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ PluginVerifier tmp *TestMy.java .*.swp +gh-pages diff --git a/build.xml b/build.xml index 7ea61a95155..570d57556dc 100644 --- a/build.xml +++ b/build.xml @@ -131,6 +131,16 @@ + + + + + + + + + + diff --git a/updatedoc.sh b/updatedoc.sh new file mode 100755 index 00000000000..5a6fea56b1e --- /dev/null +++ b/updatedoc.sh @@ -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"