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 2023/07/21 05:14:24 UTC

[camel] branch main updated: CAMEL-19121: camel-jbang - Adapt to Camel v4

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 00bc4eee332 CAMEL-19121: camel-jbang - Adapt to Camel v4
00bc4eee332 is described below

commit 00bc4eee332a1a36ddf8f8f4768aad07df5bfb10
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Jul 21 07:14:07 2023 +0200

    CAMEL-19121: camel-jbang - Adapt to Camel v4
---
 dsl/camel-jbang/camel-jbang-container/Dockerfile                      | 2 +-
 .../src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java   | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/dsl/camel-jbang/camel-jbang-container/Dockerfile b/dsl/camel-jbang/camel-jbang-container/Dockerfile
index 0245e4e6915..7ba63f12560 100644
--- a/dsl/camel-jbang/camel-jbang-container/Dockerfile
+++ b/dsl/camel-jbang/camel-jbang-container/Dockerfile
@@ -19,5 +19,5 @@ FROM docker.io/jbangdev/jbang-action
 
 RUN jbang trust add https://github.com/apache/camel
     
-ENTRYPOINT [ "jbang",  "-Dcamel.jbang.version=3.21.0", "camel@apache/camel"]
+ENTRYPOINT [ "jbang",  "-Dcamel.jbang.version=4.0.0-RC1", "camel@apache/camel"]
 
diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
index a6d37957bb5..f5c806d4765 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
@@ -596,6 +596,10 @@ public class Run extends CamelCommand {
         if (camelVersion != null) {
             // run in another JVM with different camel version (foreground or background)
             boolean custom = camelVersion.contains("-") && !camelVersion.endsWith("-SNAPSHOT");
+            if (custom) {
+                // regular camel versions can also be a milestone or release candidate
+                custom = !camelVersion.matches(".*-(RC|M)\\d$");
+            }
             if (custom) {
                 // custom camel distribution
                 return runCustomCamelVersion(main);