From 7b04cd94655c65a440832f30a0cc02e998a45a64 Mon Sep 17 00:00:00 2001 From: Pasquale Congiusti Date: Mon, 13 Mar 2023 18:54:15 +0100 Subject: [PATCH] feat(ci): scrape latest CK runtime available --- .github/actions/automatic-updates/action.yml | 1 + script/update_default_ck_runtime.sh | 28 ++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100755 script/update_default_ck_runtime.sh diff --git a/.github/actions/automatic-updates/action.yml b/.github/actions/automatic-updates/action.yml index ffa325c308..3af58429b2 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/update_default_ck_runtime.sh b/script/update_default_ck_runtime.sh new file mode 100755 index 0000000000..66ae65544e --- /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