You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by cl...@apache.org on 2023/02/07 18:50:24 UTC

[camel-k] branch main updated: Fix the package of camel-k-runtime when using SNAPSHOT version (#4037)

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 0bdf78034 Fix the package of camel-k-runtime when using SNAPSHOT version (#4037)
0bdf78034 is described below

commit 0bdf780341478cf22545376c2ca6f3057e91ce54
Author: Claudio Miranda <cl...@claudius.com.br>
AuthorDate: Tue Feb 7 15:50:18 2023 -0300

    Fix the package of camel-k-runtime when using SNAPSHOT version (#4037)
    
    When using the SNAPSHOT version, use the camel-k-runtime distribution
    from the local directory instead of downloading it.
---
 script/package_maven_artifacts.sh | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/script/package_maven_artifacts.sh b/script/package_maven_artifacts.sh
index ac461dbf8..26be424bb 100755
--- a/script/package_maven_artifacts.sh
+++ b/script/package_maven_artifacts.sh
@@ -45,6 +45,10 @@ maven_repo=${staging_repo:-https://repo1.maven.org/maven2}
 rm -rf ${rootdir}/build/m2
 mkdir -p ${rootdir}/build/m2
 
+# Refresh maven output dir
+rm -rf ${camel_k_destination}
+mkdir -p ${camel_k_destination}
+
 if [ -z "${local_runtime_dir}" ]; then
   # Remote M2 distro
   if [ ! -z $staging_repo ]; then
@@ -59,19 +63,18 @@ if [ -z "${local_runtime_dir}" ]; then
     echo "Please, remove this check when Camel K Runtime 1.16.0 is officially released"
     exit 0
   fi
+  echo "Downloading Camel K runtime $camel_k_runtime_version M2 (may take some minute ...)"
+  mvn -q dependency:copy -Dartifact="org.apache.camel.k:apache-camel-k-runtime:$camel_k_runtime_version:zip:m2" \
+    -Dmdep.useBaseVersion=true \
+    -DoutputDirectory=${rootdir}/build/m2 \
+    -s $location/maven-settings.xml \
+    -Papache
+  unzip -q -o $PWD/build/m2/apache-camel-k-runtime-${camel_k_runtime_version}-m2.zip -d $camel_k_destination
 else
   # Local M2 distro
   echo "Installing local Camel K runtime $camel_k_runtime_version M2 from $local_runtime_dir (may take some minute ...)"
   mvn -q -f $local_runtime_dir/distribution clean install
+  unzip -q -o $local_runtime_dir/distribution/target/apache-camel-k-runtime-${camel_k_runtime_version}-m2.zip -d $camel_k_destination
 fi
 
-echo "Downloading Camel K runtime $camel_k_runtime_version M2 (may take some minute ...)"
-mvn -q dependency:copy -Dartifact="org.apache.camel.k:apache-camel-k-runtime:$camel_k_runtime_version:zip:m2" \
-  -Dmdep.useBaseVersion=true \
-  -DoutputDirectory=${rootdir}/build/m2 \
-  -s $location/maven-settings.xml \
-  -Papache
-# Refresh maven output dir
-rm -rf ${camel_k_destination}
-mkdir -p ${camel_k_destination}
-unzip -q -o $PWD/build/m2/apache-camel-k-runtime-${camel_k_runtime_version}-m2.zip -d $camel_k_destination
+