Skip to content
This repository has been archived by the owner on Mar 6, 2018. It is now read-only.

Commit

Permalink
Add documentation to repository (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
hach-que committed Apr 1, 2017
1 parent 905609c commit cae0ce8
Show file tree
Hide file tree
Showing 118 changed files with 3,390 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ StyleCop.Cache
Prototest/
Protoinject/
level_editor.xsd
Protogame.Docs/

Protogame.combined.xml
7 changes: 7 additions & 0 deletions Protogame.Docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ignore these files
_build
/Protobuild.Docs.kdev4
/.kdev4
/Protogame.Docs.kdev4
*.gen.rst
*.pyc
42 changes: 42 additions & 0 deletions Protogame.Docs/_ext/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

set -e

COMMIT=$(git rev-parse HEAD)

# Check if the documentation already exists.
set +e
curl -f -X GET https://storage.googleapis.com/protogame-docs/$COMMIT/ProtogameDocsTool/bin/Windows/AnyCPU/Debug/Protogame.combined.xml >/dev/null 2>/dev/null
CODE=$?
set -e
if [ $CODE -eq 0 ]; then
echo "Downloading existing file..."
curl -f -X GET https://storage.googleapis.com/protogame-docs/$COMMIT/ProtogameDocsTool/bin/Windows/AnyCPU/Debug/Protogame.combined.xml > ../Protogame.combined.xml
exit 0
fi

# Ask the documentation to be built on the build server.
echo "Starting build..."
curl -f -X GET "https://jenkins.redpointgames.com.au/buildByToken/buildWithParameters?job=Protogame-Docs-Build&token=BuildProtogameDocs&Commit=$COMMIT"

# Wait until the file appears on Google Cloud Storage.
echo -n "Building..."
i=0
while [ $i -lt 20 ]; do
set +e
curl -f -X GET https://storage.googleapis.com/protogame-docs/$COMMIT/ProtogameDocsTool/bin/Windows/AnyCPU/Debug/Protogame.combined.xml >/dev/null 2>/dev/null
CODE=$?
set -e
if [ $CODE -eq 0 ]; then
echo "!"
break
fi

echo -n "."
sleep 15
i=$[$i+1]
done

echo "Downloading result file..."
curl -f -X GET https://storage.googleapis.com/protogame-docs/$COMMIT/ProtogameDocsTool/bin/Windows/AnyCPU/Debug/Protogame.combined.xml > ../Protogame.combined.xml
exit 0

0 comments on commit cae0ce8

Please sign in to comment.