You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2023/03/16 09:12:38 UTC

[camel-k] branch main updated: feat(ci): scrape latest CK runtime available

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

pcongiusti 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 5595b36fc feat(ci): scrape latest CK runtime available
5595b36fc is described below

commit 5595b36fcea838e8676eee91c6e7520bc8a69f54
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Mon Mar 13 18:54:15 2023 +0100

    feat(ci): scrape latest CK runtime available
---
 .github/actions/automatic-updates/action.yml |  1 +
 script/Makefile                              |  3 +++
 script/update_default_ck_runtime.sh          | 28 ++++++++++++++++++++++++++++
 3 files changed, 32 insertions(+)

diff --git a/.github/actions/automatic-updates/action.yml b/.github/actions/automatic-updates/action.yml
index ffa325c30..3af58429b 100644
--- a/.github/actions/automatic-updates/action.yml
+++ b/.github/actions/automatic-updates/action.yml
@@ -55,6 +55,7 @@ runs:
       run: |
         make generate
         make update-docs
+        make update-default-ck-runtime
         git add -A && git commit -m 'chore: nightly resource refresh' && echo "refresh=1" >> $GITHUB_ENV || echo "No changes to make update-docs"
     - name: Push changes
       shell: bash
diff --git a/script/Makefile b/script/Makefile
index e28a4e4da..ca92f74f4 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -143,6 +143,9 @@ default: build
 update-docs: build-resources
 	./script/update_docs.sh
 
+update-default-ck-runtime:
+	./script/update_defaults_ck_runtime.sh
+
 bump-replace:
 	@# Bump version and replace with the variables provided by the user
 	@sed -i 's/^VERSION ?= .*$//VERSION ?= $(VERSION)/' ./script/Makefile
diff --git a/script/update_default_ck_runtime.sh b/script/update_default_ck_runtime.sh
new file mode 100755
index 000000000..66ae65544
--- /dev/null
+++ b/script/update_default_ck_runtime.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+set -e
+
+location=$(dirname $0)
+
+git clone --depth 1 https://github.com/apache/camel-k-runtime.git /tmp/camel-k-runtime
+ck_runtime_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout -f /tmp/camel-k-runtime/pom.xml)
+echo "INFO: last Camel K runtime version set at $ck_runtime_version"
+sed -i "s/^RUNTIME_VERSION := .*$/RUNTIME_VERSION := $ck_runtime_version/" $location/Makefile
+rm -rf /tmp/camel-k-runtime/
\ No newline at end of file