Skip to content

Commit 8fa6b2b

Browse files
committed
LDEV-4588 add built with lucee version into admin
https://luceeserver.atlassian.net/browse/LDEV-4588
1 parent 0466215 commit 8fa6b2b

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

ant/build-create-archive.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,16 @@
8080
LUCEE/ADMIN
8181
************************************/
8282
83+
8384
systemOutput("#DateTimeFormat(now(),'yyyy-mm-dd HH:nn:ss')# Generating archive #temp#/lucee-admin.lar ", true);
85+
/*
86+
write out a file into the admin with the built (i.e. current) lucee version
87+
used to check that the the deployed lucee admin version matches the actual version being run
88+
*/
89+
versionFile = "#srcAdmin#/version.cfm";
90+
defaultVersionFile = fileRead( versionFile );
91+
fileWrite( versionFile, '<cfset lucee_version="#server.lucee.version#">' );
92+
8493
// create "/lucee/admin" mapping
8594
admin
8695
action="updateMapping"
@@ -105,7 +114,8 @@
105114
addNonCFMLFiles="true"
106115
ignoreScopes="false";
107116
108-
117+
// reset to default
118+
fileWrite( versionFile, defaultVersionFile );
109119
110120
/************************************
111121
LUCEE/DOC

core/src/main/cfml/context/admin/overview.cfm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ Redirect to entry --->
6565
<cflocation url="#request.self#" addtoken="no">
6666
</cfif>
6767

68+
<cfset lucee_version = "UNKNOWN">
69+
<cfinclude template="version.cfm">
70+
<cfif lucee_version neq server.lucee.version>
71+
<cfoutput>
72+
<div class="error">Warning Lucee Admin was compiled with version #lucee_version#?</div>
73+
</cfoutput>
74+
</cfif>
75+
6876
<!---
6977
Error Output --->
7078
<cfset printError(error)>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<cfset lucee_version="UNKNOWN">

0 commit comments

Comments
 (0)