You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2022/04/13 18:30:12 UTC
[camel-k] 05/05: chore(ci): staging catalog
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 3e0b316f5903a209e0d0961b8fe59d1fcda62373
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Wed Apr 13 15:52:06 2022 +0200
chore(ci): staging catalog
---
script/Makefile | 2 +-
script/get_catalog.sh | 13 ++++++++++---
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/script/Makefile b/script/Makefile
index 5482d2ad2..83b7dcb47 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -239,7 +239,7 @@ else
endif
build-resources:
- ./script/get_catalog.sh $(RUNTIME_VERSION)
+ ./script/get_catalog.sh $(RUNTIME_VERSION) $(STAGING_RUNTIME_REPO)
go generate ./pkg/...
bundle-kamelets:
diff --git a/script/get_catalog.sh b/script/get_catalog.sh
index f5fa05cec..fec9a6646 100755
--- a/script/get_catalog.sh
+++ b/script/get_catalog.sh
@@ -19,10 +19,17 @@ location=$(dirname $0)
rootdir=$location/../
if [ "$#" -lt 1 ]; then
- echo "usage: $0 <Camel K runtime version>"
+ echo "usage: $0 <Camel K runtime version> [<staging repository>]"
exit 1
fi
-mvn -q dependency:copy -Dartifact="org.apache.camel.k:camel-k-catalog:$1:yaml:catalog" -DoutputDirectory=${rootdir}/resources/
-mv ${rootdir}/resources/camel-k-catalog-$1-catalog.yaml ${rootdir}/resources/camel-catalog-$1.yaml
+if [ -z $2 ]; then
+ mvn -q dependency:copy -Dartifact="org.apache.camel.k:camel-k-catalog:$1:yaml:catalog" -DoutputDirectory=${rootdir}/resources/
+ mv ${rootdir}/resources/camel-k-catalog-$1-catalog.yaml ${rootdir}/resources/camel-catalog-$1.yaml
+else
+ # TODO: fix this workaround to use the above mvn statement with the staging repository as well
+ echo "INFO: extracting a catalog from staging repository $2"
+ wget -q $2/org/apache/camel/k/camel-k-catalog/$1/camel-k-catalog-$1-catalog.yaml -O ${rootdir}/resources/camel-catalog-$1.yaml
+fi
+