-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-bundles.xml
89 lines (72 loc) · 2.07 KB
/
build-bundles.xml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?xml version="1.0" encoding="UTF-8"?>
<project default="all" basedir="." name="Lucee">
<property name="src" location="${src}"/>
<macrodef name="echots">
<attribute name="message"/>
<sequential>
<local name="timestamp" />
<tstamp>
<format property="timestamp" pattern="yyyy-MM-dd HH:mm:ss" />
</tstamp>
<echo level="info" message="---------- ${timestamp} - @{message} ----------" />
</sequential>
</macrodef>
<target name="all">
<echots message="Starting Lucee"/>
<script language="CFML">
<![CDATA[
systemOutput("---------- #DateTimeFormat(now(),'yyyy-mm-dd HH:nn:ss')# - Lucee Started ----------", true);
SystemOutput("source: #src#", true);
try {
// set a password for the admin
if(!server.lucee.singleContext) {
admin
action="updatePassword"
type="web"
oldPassword=""
newPassword="webweb";
}
admin
action="updatePassword"
type="server"
oldPassword=""
newPassword="webweb";
/************************************
LUCEE/ADMIN
************************************/
systemOutput("#DateTimeFormat(now(),'yyyy-mm-dd HH:nn:ss')# Generating archive #temp#/lucee-admin.lar ", true);
/*
write out a file into the admin with the built (i.e. current) lucee version
used to check that the the deployed lucee admin version matches the actual version being run
*/
versionFile = "#src#/version.cfm";
defaultVersionFile = fileRead( versionFile );
fileWrite( versionFile, '<cfset lucee_version="#server.lucee.version#">' );
// create "/lucee/admin" mapping
admin
action="updateMapping"
type="web"
password="webweb"
virtual="/admin"
physical="#src#"
toplevel="true"
archive=""
primary="physical"
trusted="no";
// create an archive from the mapping
admin
action="createArchive"
type="web"
password="webweb"
file="#temp#/lucee-admin.lar"
virtual="/admin"
addCFMLFiles="true"
addNonCFMLFiles="true"
ignoreScopes="false";
// reset to default
fileWrite( versionFile, defaultVersionFile );
systemOutput( DateTimeFormat(now(),'yyyy-mm-dd HH:nn:ss') & " finished", true);
]]>
</script>
</target>
</project>