You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2020/04/27 08:18:17 UTC

[sling-site] branch master updated (3fccabb -> a877a7c)

This is an automated email from the ASF dual-hosted git repository.

bdelacretaz pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-site.git.


    from 3fccabb  Point to build URL
     new 868f48f  Better reporting of incorrectly formatted data lines
     new a877a7c  Fix incorrect download data line

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/main/jbake/templates/downloads.tpl     | 19 ++++++++++++-------
 src/main/jbake/templates/includes/U.groovy | 13 +++++++++++++
 2 files changed, 25 insertions(+), 7 deletions(-)


[sling-site] 02/02: Fix incorrect download data line

Posted by bd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bdelacretaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-site.git

commit a877a7cd4a32f162c8fb251f7517f50f5ceb09b6
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Mon Apr 27 10:18:03 2020 +0200

    Fix incorrect download data line
---
 src/main/jbake/templates/downloads.tpl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/main/jbake/templates/downloads.tpl b/src/main/jbake/templates/downloads.tpl
index ebf802d..db3b3f5 100644
--- a/src/main/jbake/templates/downloads.tpl
+++ b/src/main/jbake/templates/downloads.tpl
@@ -4,6 +4,9 @@
 // downloads page work. Basically, we provide a downloads.html page with a few placeholders
 // and a form to select the download mirrog, and a downloads.cgi page which wraps the apache.org
 // download logic CGI.
+//
+// To test this page in a local build, open http://localhost:8820/downloads.html - the navigation
+// link points to the .cgi variant which doesn't work locally.
 // ------------------------------------------------------------------------------------------------
 
 // ------------------------------------------------------------------------------------------------
@@ -280,7 +283,7 @@ def deprecated=[
   "Health Check Integration Tests|Migrated to Apache Felix Health Checks|org.apache.sling.hc.it|1.0.4",
   "Health Check Samples|Migrated to Apache Felix Health Checks|org.apache.sling.hc.samples|1.0.6",
   "Health Check Webconsole|Migrated to Apache Felix Health Checks|org.apache.sling.hc.webconsole|1.1.2",
-  "Installer Subystems Support|org.apache.sling.installer.factory.subsystems|1.0.0",
+  "Installer Subystems Support|TODO moved here in commit b8c5ff0e2, please indicate why|org.apache.sling.installer.factory.subsystems|1.0.0",
   "JCR Compiler|Replaced with FS ClassLoader|org.apache.sling.jcr.compiler|2.1.0",
   "JCR Jackrabbit Server|Replaced with Apache Jackrabbit Oak|org.apache.sling.jcr.jackrabbit.server|2.3.0",
   "JCR Prefs|Replaced with CA Configs|org.apache.sling.jcr.prefs|1.0.0",


[sling-site] 01/02: Better reporting of incorrectly formatted data lines

Posted by bd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bdelacretaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-site.git

commit 868f48f639351369928d00d2cd2c8aba3642d57a
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Mon Apr 27 10:12:24 2020 +0200

    Better reporting of incorrectly formatted data lines
---
 src/main/jbake/templates/downloads.tpl     | 14 ++++++++------
 src/main/jbake/templates/includes/U.groovy | 13 +++++++++++++
 2 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/src/main/jbake/templates/downloads.tpl b/src/main/jbake/templates/downloads.tpl
index f7ffb2a..ebf802d 100644
--- a/src/main/jbake/templates/downloads.tpl
+++ b/src/main/jbake/templates/downloads.tpl
@@ -12,6 +12,8 @@
 // To convert from the old svn downloads.list ust
 //    while read l; do echo "  \"$l\","; done < content/downloads.list
 // ------------------------------------------------------------------------------------------------
+U = new includes.U(config)
+def PIPE_SEP = "\\|"
 def launchpadVersion="11"
 
 def slingIDETooling=[
@@ -366,7 +368,7 @@ layout 'layout/main.tpl', true,
 							tbody() {
 								slingApplication.each { line ->
 									tr() {
-										def data = line.split("\\|")
+										def data = U.splitLine(line, PIPE_SEP, 6)
 										td(data[0])
 										td(data[4])
 										td(){
@@ -388,7 +390,7 @@ layout 'layout/main.tpl', true,
 							tbody() {
 								slingIDETooling.each { line ->
 									tr() {
-										def data = line.split("\\|")
+										def data = U.splitLine(line, PIPE_SEP, 3)
 										td(data[0])
 										td(data[2])
 										td(data[3])
@@ -407,7 +409,7 @@ layout 'layout/main.tpl', true,
 							tbody() {
 								bundles.each { line ->
 									tr() {
-										def data = line.split("\\|")
+										def data = U.splitLine(line, PIPE_SEP, 5)
 										td(data[0])
 										td(data[2])
 										def artifact = data[1]
@@ -434,7 +436,7 @@ layout 'layout/main.tpl', true,
 							tbody() {
 								mavenPlugins.each { line ->
 									tr() {
-										def data = line.split("\\|")
+										def data = U.splitLine(line, PIPE_SEP, 4)
 										td(data[0])
 										td(data[2])
 										def artifact = data[1]
@@ -460,7 +462,7 @@ layout 'layout/main.tpl', true,
 							tbody() {
 								bndPlugins.each { line ->
 									tr() {
-										def data = line.split("\\|")
+										def data = U.splitLine(line, PIPE_SEP, 4)
 										td(data[0])
 										td(data[2])
 										def artifact = data[1]
@@ -486,7 +488,7 @@ layout 'layout/main.tpl', true,
 							tbody() {
 								deprecated.each { line ->
 									tr() {
-										def data = line.split("\\|")
+										def data = U.splitLine(line, PIPE_SEP, 4)
 										td(data[0])
 										td(data[1])
 										td(data[3])
diff --git a/src/main/jbake/templates/includes/U.groovy b/src/main/jbake/templates/includes/U.groovy
index bce03c6..9a12901 100644
--- a/src/main/jbake/templates/includes/U.groovy
+++ b/src/main/jbake/templates/includes/U.groovy
@@ -9,6 +9,19 @@ class U {
         def once = new runonce.OncePerBuild(jbakeConfig)
     }
 
+    def splitLine(line, separator, expectedParts) {
+        def result = line.split(separator)
+        if(result.length < expectedParts) {
+            throw new Exception(
+                "Expected " + expectedParts
+                + " parts separated with " + separator
+                + ", but got " + result.length
+                + "  in line: " + line
+            )
+        }
+        return result
+    }
+
     def processBody(content, config) {
     	def str = content.body