Merge pull request #6219 from Mailaender/auto-lua-update

Fixed the automatic wiki documentation update
This commit is contained in:
Paul Chote
2014-08-16 12:21:07 +12:00
2 changed files with 13 additions and 8 deletions

View File

@@ -17,6 +17,10 @@ script:
- make all - make all
- make test - make test
# Automatically update the trait documentation and Lua API
after_success:
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && make docs && cd packaging && ./update-wiki.sh
# Only watch the development branch and tagged release. # Only watch the development branch and tagged release.
branches: branches:
only: only:

View File

@@ -1,17 +1,18 @@
git config --global user.email "travis@travis-ci.org" #!/bin/bash
git config --global user.name "travis-ci"
git config --global user.email "orabot@users.noreply.github.com"
git config --global user.name "orabot"
echo "Updating https://github.com/OpenRA/OpenRA/wiki/Traits" echo "Updating https://github.com/OpenRA/OpenRA/wiki/Traits"
rm -rf openra-wiki rm -rf $HOME/openra-wiki
git clone git@github.com:OpenRA/OpenRA.wiki.git openra-wiki git clone git@github.com:OpenRA/OpenRA.wiki.git $HOME/openra-wiki
cp -fr ../DOCUMENTATION.md openra-wiki/Traits.md cp -fr ../DOCUMENTATION.md $HOME/openra-wiki/Traits.md
pushd .. &> /dev/null pushd .. &> /dev/null
# d2k depends on all mod libraries mono --debug OpenRA.Utility.exe --lua-docs d2k > $HOME/openra-wiki/New-Lua-API.md
mono --debug OpenRA.Utility.exe --lua-docs d2k > packaging/openra-wiki/New-Lua-API.md
popd &> /dev/null popd &> /dev/null
pushd openra-wiki pushd $HOME/openra-wiki
git add Traits.md git add Traits.md
git add New-Lua-API.md git add New-Lua-API.md
git commit -m "Update trait and scripting documentation" git commit -m "Update trait and scripting documentation"