Skip to content

Commit ea63de0

Browse files
committed
add meta-data to changelog
1 parent 45a66d7 commit ea63de0

File tree

1 file changed

+63
-15
lines changed

1 file changed

+63
-15
lines changed

apps/download/changelog/index.cfm

Lines changed: 63 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
</script>
4242
--->
4343
<cflock type="exclusive" name="changelogReport-#url.version#" timeout=1 throwontimeout="false">
44+
<cfsilent>
4445
<cfscript>
4546
buildStarted = getTickCount();
4647
systemOutput("building changelog for #url.version#, please wait......", true);
@@ -117,7 +118,7 @@
117118
//ticketTypes={};
118119
//ticketLabels={};
119120
</cfscript>
120-
121+
</cfsilent>
121122
<cfsavecontent variable="changelog_report">
122123
<cfoutput>
123124
<!DOCTYPE html>
@@ -131,7 +132,9 @@
131132
<cfinclude template="../_linkbar.cfm">
132133
<h2 class="display-3">Lucee Server Changelogs - #url.version#</h2>
133134
</div>
135+
<cfsilent>
134136
<cfloop array="#arrVersions#" item="_version" index="idx">
137+
135138
<cfscript>
136139
version = versions[ _version ].version;
137140
if (idx lt ArrayLen(arrVersions)){
@@ -163,7 +166,7 @@
163166
_version: _version,
164167
type: versions[_version].type,
165168
prevVersion: prevVersion,
166-
versionReleaseDate = versionReleaseDate,
169+
versionReleaseDate: versionReleaseDate,
167170
changelog: changelog,
168171
header: header,
169172
versionTitle: versionTitle
@@ -188,6 +191,7 @@
188191
189192
</cfscript>
190193
</cfloop>
194+
</cfsilent>
191195
<cfset lastMajor = "">
192196
<div class="versionList">
193197
<cfloop array="#arrChangeLogs#" item="luceeVersion">
@@ -196,10 +200,18 @@
196200
Lucee Releases:
197201
</cfif>
198202
<cfset lastMajor = left(LuceeVersion.version, 3)>
199-
<b><a href="?version=#left(luceeVersion.version,3)#">#left(LuceeVersion.version, 3)#</a>&nbsp;</b>&nbsp;
200-
<a href="?version=#left(luceeVersion.version,3)####luceeVersion.version#">#luceeVersion.version#</a>&nbsp;
203+
<b><a href="?version=#left(luceeVersion.version,3)#"
204+
data-version="#left(LuceeVersion.version, 3)#"
205+
data-status="#stMajorVersion[left(LuceeVersion.version, 3)] ?: 'Active'#"
206+
title="View all #left(LuceeVersion.version, 3)# releases - Status: #stMajorVersion[left(LuceeVersion.version, 3)] ?: 'Active'#">#left(LuceeVersion.version, 3)#</a>&nbsp;</b>&nbsp;
207+
<a href="?version=#left(luceeVersion.version,3)####luceeVersion.version#"
208+
data-version="#luceeVersion.version#"
209+
data-type="#luceeVersion.type#"
210+
data-release-date="#luceeVersion.versionReleaseDate#"
211+
data-git-tag="https://github.com/lucee/Lucee/tree/#listFirst(luceeVersion.version, '-')#"
212+
title="View changelog for #luceeVersion.version# - Type: #luceeVersion.type# - Released: #luceeVersion.versionReleaseDate#"
213+
>#luceeVersion.version#</a>&nbsp;
201214
</cfif>
202-
203215
</cfloop>
204216
</div>
205217
<cfif stMajorVersion[ url.version ] eq "false">
@@ -250,10 +262,27 @@
250262
<tr>
251263
<td colspan="4">
252264
<#lv.header# class="modal-title" id="#lv.version#">
253-
<b><a href="?version=#left(lv.version,3)####lv.version#">Lucee #lv.versionTitle#</a></b>
265+
<b><a href="?version=#left(lv.version,3)####lv.version#"
266+
data-version="#lv.version#"
267+
data-type="#lv.type#"
268+
data-release-date="#lv.versionReleaseDate#"
269+
data-status="#stMajorVersion[left(lv.version,3)] ?: 'Active'#"
270+
data-git-tag="https://github.com/lucee/Lucee/tree/#listFirst(lv.version, '-')#"
271+
title="Lucee #lv.version# Details - Type: #uCase(left(lv.type,1)) & right(lv.type, len(lv.type)-1)# - Released: #lv.versionReleaseDate# - Status: #stMajorVersion[left(lv.version,3)] ?: 'Active'#">Lucee #lv.versionTitle#</a></b>
272+
<cfif lv.type eq "releases">
273+
<span class="badge badge-success ml-1" title="Production Ready">STABLE</span>
274+
<cfelseif lv.type eq "rc">
275+
<span class="badge badge-warning ml-1" title="Release Candidate - Pre-release">RC</span>
276+
<cfelseif lv.type eq "beta">
277+
<span class="badge badge-info ml-1" title="Beta Version - Testing">BETA</span>
278+
<cfelseif lv.type eq "snapshots">
279+
<span class="badge badge-secondary ml-1" title="Development Build - Not for Production">SNAPSHOT</span>
280+
<cfelseif lv.type eq "alpha">
281+
<span class="badge badge-dark ml-1" title="Alpha Version - Early Testing">ALPHA</span>
282+
</cfif>
254283
<small>
255-
<span class="mr-2">#lv.versionReleaseDate#</span>
256-
<a href="../?#lv.type#=#lv._version###core" title="Jump to Downloads"><span class="glyphicon glyphicon-download-alt"></span></a>
284+
<time class="mr-2" datetime="#lv.versionReleaseDate#" data-release-date="#lv.versionReleaseDate#">#lv.versionReleaseDate#</time>
285+
<a href="../?#lv.type#=#lv._version###core" title="Jump to Downloads for #lv.version#"><span class="glyphicon glyphicon-download-alt"></span></a>
257286
</small>
258287
</#lv.header#>
259288
</td>
@@ -262,18 +291,33 @@
262291
<cfloop struct="#lv.changelog#" index="ver" item="tickets">
263292
<cfloop struct="#tickets#" index="id" item="ticket">
264293
<cfif !StructKeyExists(changelogTicketList, ticket.id)>
265-
<tr valign="top">
266-
<td nowrap><a href="https://bugs.lucee.org/browse/#id#" target="blank" class="mr-1">#id#</a></td>
267-
<td><span class="label label-#getBadgeForType(ticket.type)# mr-1" data-ticket-type="#ticket.type#">#ticket.type#</span></td>
294+
<tr valign="top"
295+
data-ticket-id="#id#"
296+
data-ticket-type="#ticket.type#"
297+
data-fix-versions="#arrayToList(ticket.fixVersions, ',')#"
298+
<cfif len(ticket.labels)>data-labels="#arrayToList(ticket.labels, ',')#"</cfif>>
299+
<td nowrap><a href="https://bugs.lucee.org/browse/#id#" target="blank" class="mr-1"
300+
data-ticket-id="#id#"
301+
title="View #ticket.type# ticket #id# on JIRA">#id#</a></td>
302+
<td><span class="label label-#getBadgeForType(ticket.type)# mr-1"
303+
data-ticket-type="#ticket.type#"
304+
title="#ticket.type# - #ticket.summary#">#ticket.type#</span></td>
268305
<td>#encodeForHtml(wrap(ticket.summary,70))#
269306
<cfif len(ticket.labels)>
270307
<br>
271-
<cfloop array="#ticket.labels#" item="label">
272-
<span class="label label-default">#encodeForHtml(label)#</span>
273-
</cfloop>
308+
<div class="ticket-labels">
309+
<cfloop array="#ticket.labels#" item="label">
310+
<span class="label label-default">#encodeForHtml(label)#</span>
311+
</cfloop>
312+
</div>
274313
</cfif>
275314
</td>
276-
<td style="max-width:250px;">#encodeForHtml(wrap(arrayToList(ticket.fixVersions,", "),15))#</td>
315+
<td style="max-width:250px;" data-fix-versions="#encodeForHtmlAttribute(arrayToList(ticket.fixVersions, ', '))#"
316+
title="Fixed in versions: #arrayToList(ticket.fixVersions, ', ')#">
317+
<cfloop array="#ticket.fixVersions#" item="fixVersion" index="i">
318+
<span data-git-tag="https://github.com/lucee/Lucee/tree/#listFirst(fixVersion, '-')#">#fixVersion#</span><cfif i lt arrayLen(ticket.fixVersions)>, </cfif>
319+
</cfloop>
320+
</td>
277321
</tr>
278322
<cfset changelogTicketList[ticket.id] = true>
279323
</cfif>
@@ -292,6 +336,10 @@
292336
systemOutput("Changelog for [#url.version#] built in #numberFormat(getTickCount()-buildStarted)#ms", true);
293337
if ( !structKeyExists( application, "changeLogReport" ) )
294338
application.changeLogReport = {};
339+
// cleanup excessive whitespace while preserving readability
340+
changelog_report = rereplace( changelog_report, "\t+", "", "all" );
341+
changelog_report = rereplace( changelog_report, " {2,}", " ", "all" );
342+
changelog_report = rereplace( changelog_report, "\n\s+", chr(10), "all" );
295343
application.changeLogReport[ url.version ] = changelog_report;
296344
if ( structKeyExists(application, "changeLogReportOld" ) )
297345
structDelete( application[ "changeLogReportOld" ], url.version );

0 commit comments

Comments
 (0)