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:16:30 UTC

[camel] branch camel-3.20.x updated: camel-jbang - Run change version should handle RC and M versions

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

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


The following commit(s) were added to refs/heads/camel-3.20.x by this push:
     new 62b5ee063f8 camel-jbang - Run change version should handle RC and M versions
62b5ee063f8 is described below

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

    camel-jbang - Run change version should handle RC and M versions
---
 .../src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java   | 4 ++++
 1 file changed, 4 insertions(+)

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 4624fff9700..87b3740e45c 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
@@ -577,6 +577,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);