From 9e3f2627ca8a9adc55e006cbb1577d547dc8ffcd Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 15 Sep 2013 00:08:36 +0200 Subject: Added a script that uploads the APIDump's docs to a website. An API nightbuild has been set up at http://mc-server.xoft.cz/LuaAPI --- MakeLuaAPI.cmd | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 MakeLuaAPI.cmd (limited to 'MakeLuaAPI.cmd') diff --git a/MakeLuaAPI.cmd b/MakeLuaAPI.cmd new file mode 100644 index 000000000..80bb206d4 --- /dev/null +++ b/MakeLuaAPI.cmd @@ -0,0 +1,65 @@ +@echo off +:: MakeLuaAPI.cmd +:: This script is run after the nightbuild to produce the Lua API documentation and upload it to a website. +:: It expects at least three environment variables set: ftpsite, ftpuser and ftppass, specifying the FTP site and login to use for the upload + + + + + +:: Check that we got all the environment vars needed for the upload: + +if "a%ftppass%" == "a" ( + echo You need to set FTP password in the ftppass environment variable to upload the files + goto end +) +if "a%ftpuser%" == "a" ( + echo You need to set FTP username in the ftpuser environment variable to upload the files + goto end +) +if "a%ftpsite%" == "a" ( + echo You need to set FTP server in the ftpsite environment variable to upload the files + goto end +) + + + + + +:: Create the API documentation by running the server and stopping it right after it starts: + +cd MCServer +echo stop | MCServer +cd .. + + + + + +:: Upload the API to the web: + +ncftpput -p %ftppass% -u %ftpuser% -T temp_ %ftpsite% /LuaAPI MCServer/API/*.* +if errorlevel 1 goto haderror +echo Upload finished. + +goto end + + + + + +:haderror +echo an error was encountered, check command output above +pause +goto finished + + + + + +:end +if "a%1" == "a" pause + + + +:finished \ No newline at end of file -- cgit v1.2.3