You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/10/21 18:41:13 UTC

[camel] 01/03: CAMEL-14095: Use since instead of available as of in the docs

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

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 0b8156c08bfbf6a41d8e43ea22e5e7955bc9d3ad
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Oct 21 19:57:39 2019 +0200

    CAMEL-14095: Use since instead of available as of in the docs
---
 .../org/apache/camel/maven/packaging/UpdateReadmeMojo.java   | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateReadmeMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateReadmeMojo.java
index 542cb6a..387581d 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateReadmeMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateReadmeMojo.java
@@ -511,11 +511,11 @@ public class UpdateReadmeMojo extends AbstractMojo {
             // check the first four lines (ignoring the first line)
             boolean title = lines[1].startsWith("#") || lines[1].startsWith("=");
             boolean empty = lines[2].trim().isEmpty();
-            boolean availableFrom = lines[3].trim().contains("Available as of") || lines[3].trim().contains("Available in");
+            boolean since = lines[3].trim().contains("Since Camel");
             boolean empty2 = lines[4].trim().isEmpty();
 
-            if (title && empty && availableFrom) {
-                String newLine = "*Available as of Camel version " + version + "*";
+            if (title && empty && since) {
+                String newLine = "*Since Camel " + version + "*";
                 if (!newLine.equals(lines[3])) {
                     newLines.set(3, newLine);
                     updated = true;
@@ -524,8 +524,8 @@ public class UpdateReadmeMojo extends AbstractMojo {
                     newLines.add(4, "");
                     updated = true;
                 }
-            } else if (!availableFrom) {
-                String newLine = "*Available as of Camel version " + version + "*";
+            } else if (!since) {
+                String newLine = "*Since Camel " + version + "*";
                 newLines.add(3, newLine);
                 newLines.add(4, "");
                 updated = true;
@@ -533,7 +533,7 @@ public class UpdateReadmeMojo extends AbstractMojo {
 
             if (updated) {
                 // build the new updated text
-                String newText = newLines.stream().collect(Collectors.joining("\n"));
+                String newText = String.join("\n", newLines);
                 writeText(file, newText);
             }
         } catch (Exception e) {