From 7359af86675c9bfebdafb3903e4567036174d102 Mon Sep 17 00:00:00 2001 From: Oliver Brakmann Date: Sat, 15 Nov 2014 23:09:08 +0100 Subject: [PATCH] Wiki: keep separate Trait and Lua API docs for release and playtest --- .travis.yml | 2 +- packaging/update-wiki.sh | 28 ++++++++++++++++++++++------ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0199f54c1f..bc4b4b8f04 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,7 @@ script: # 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 + - test $TRAVIS_PULL_REQUEST == "false" && make docs && cd packaging && ./update-wiki.sh $TRAVIS_BRANCH # Only watch the development branch and tagged release. branches: diff --git a/packaging/update-wiki.sh b/packaging/update-wiki.sh index 7208df753d..dbde85e23d 100755 --- a/packaging/update-wiki.sh +++ b/packaging/update-wiki.sh @@ -1,17 +1,33 @@ #!/bin/bash +case "$1" in + "bleed") + exit + ;; + "next") + TAG=" (playtest)" + ;; + "master") + TAG="" + ;; + *) + #Eh? Unknown branch + exit + ;; +esac + git config --global user.email "orabot@users.noreply.github.com" git config --global user.name "orabot" echo "Updating https://github.com/OpenRA/OpenRA/wiki/" rm -rf $HOME/openra-wiki git clone git@github.com:OpenRA/OpenRA.wiki.git $HOME/openra-wiki -cp -fr ../DOCUMENTATION.md $HOME/openra-wiki/Traits.md -cp -fr ../Lua-API.md $HOME/openra-wiki/Lua-API.md +cp -fr ../DOCUMENTATION.md "${HOME}/openra-wiki/Traits${TAG}.md" +cp -fr ../Lua-API.md "${HOME}/openra-wiki/Lua API${TAG}.md" pushd $HOME/openra-wiki -git add Traits.md -git add Lua-API.md -git commit -m "Update trait and scripting documentation" +git add "Traits${TAG}.md" +git add "Lua API${TAG}.md" +git commit -m "Update trait and scripting documentation for branch $1" git push origin master -popd \ No newline at end of file +popd