-
Notifications
You must be signed in to change notification settings - Fork 285
/
build.sh
executable file
·64 lines (51 loc) · 1.7 KB
/
build.sh
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
58
59
60
61
62
#!/bin/bash
cd `dirname $0`
CWD="`pwd`"
# add redis extension
export LUCEE_EXTENSIONS="60772C12-F179-D555-8E2CD2B4F7428718"
echo "Starting Lucee 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 "Local Lucee Server Started!";
echo "Importing reference docs from previously undocumented functions and tags..."
curl --no-progress-meter http://localhost:8765/import.cfm?textlogs=true
echo "Building documentation (please be patient, it may take some time)..."
curl --no-progress-meter http://localhost:8765/build.cfm?textlogs=true
echo "Stopping Lucee5 server..."
box server stop luceedocsbuilder
if [ -f .exitcode ]; then
exitcode=$(<.exitcode)
rm -f .exitcode
echo "Exiting build, documentation build failed. Exit code: $exitcode"
exit $exitcode
fi
echo "Building complete"
if [ "$DOCS_BRANCH" = "refs/heads/master" ] && [ "$DOCS_EVENT" = "push" ] ; 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 for s3 upload."
# this is now done in a GitHub Action step
#echo "Syncing with S3..."
#s3_website push
#echo "All done :)"
fi
#echo "Ping search engines with sitemaps"
#curl https://google.com/ping?sitemap=https://docs.lucee.org/sitemap.xml