forked from lucee/lucee-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.bat
57 lines (48 loc) · 1.42 KB
/
build.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
set CWD=%cd%
echo Starting Lucee5 server with which to build the docs...
box server stop luceedocsbuilder
box start ^
name="luceedocsbuilder" ^
cfengine="lucee@5" ^
port=8765 ^
openbrowser=false ^
directory=%CWD% ^
javaVersion=openjdk8_jre_jdk8u332-b09 ^
heapSize=2048
echo Done!
echo Importing reference docs from previously undocumented functions and tags...
curl http://localhost:8765/import.cfm?textlogs=true
echo Building documentation (please be patient, it may take some time)...
curl http://localhost:8765/build.cfm?textlogs=true
echo "Stopping Lucee5 server..."
box server stop luceedocsbuilder
@echo off
IF EXIST .exitcode (
set /p exitcode=<.exitcode
del .exitcode
echo Exiting build, documentation build failed with exitcode %exitcode%
exit /b %exitcode%
)
echo on
echo Exporting docs TBD for Windows batch file
exit /b
echo Building complete
if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ] ; then
echo "Zipping up docs for offline download..."
cd builds/html
cp ../../.cloudfront-distribution-id ./
zip -q -r lucee-docs.zip *
cd ../../
echo "Zipped."
echo "Preparing dash artifacts..."
cp -r builds/html builds/artifacts
mkdir builds/artifacts/dash
cp builds/dash/lucee.xml builds/artifacts/dash/
cd builds/dash
tar -czf ../../builds/artifacts/dash/lucee.tgz lucee.docset
cd ../../
echo "Prepared."
echo "Syncing with S3..."
s3_website push
echo "All done :)"
fi