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 11230933e fix(doc): add a last released variable
11230933e is described below

commit 11230933e4b90bf7cfd6fc1b9398ab9239be0814
Author: Pasquale Congiusti <pasquale.congiu...@gmail.com>
AuthorDate: Thu Nov 28 18:41:17 2024 +0100

    fix(doc): add a last released variable
    
    Closes #5951
---
 docs/antora.yml                                        | 1 +
 docs/modules/ROOT/pages/concepts/dependencies.adoc     | 5 +++--
 docs/modules/ROOT/pages/installation/installation.adoc | 4 ++--
 script/update_docs.sh                                  | 3 +++
 4 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/docs/antora.yml b/docs/antora.yml
index 4ba13dba7..c3df7be9a 100644
--- a/docs/antora.yml
+++ b/docs/antora.yml
@@ -28,6 +28,7 @@ asciidoc:
   attributes:
     requires: "'util=camel-website-util,ck=xref:js/ck.js'"
     prerelease: true
+    last-released-version: 2.5.0
     camel-k-runtime-version: 3.15.0
     camel-api-versions: camel.apache.org/v1 camel.apache.org/v1alpha1 # from 
Makefile BUNDLE_CAMEL_APIS
     camel-version: 4.8.0
diff --git a/docs/modules/ROOT/pages/concepts/dependencies.adoc 
b/docs/modules/ROOT/pages/concepts/dependencies.adoc
index 2680aba56..778dbab13 100644
--- a/docs/modules/ROOT/pages/concepts/dependencies.adoc
+++ b/docs/modules/ROOT/pages/concepts/dependencies.adoc
@@ -4,9 +4,10 @@ From Camel K version 2 onward you will be able to use any 
Camel K Runtime. Each
 
 [caption=]
 .Camel dependencies matrix
-[width="100%",cols="4,2,2,2,2,3",options="header"]
+[width="100%",cols="4,2,2,2,2,2,3",options="header"]
 |===
 |Camel K Version
+|Last release
 |(Default) Camel K Runtime
 |Camel Quarkus
 |Camel
@@ -15,7 +16,7 @@ From Camel K version 2 onward you will be able to use any 
Camel K Runtime. Each
 |===
 
 //cannot use top level index.adoc as the page with the query is always omitted.
-indexTable::[version="*",relative="running/running.adoc",cellformats="util.ckRef(pageComponentDisplayVersion,
 
pageComponentVersion)|camelKRuntimeVersion|util.camelQuarkusRef(camelQuarkusVersion,
 camelQuarkusDocsVersion)|util.camelRef(camelVersion, 
camelDocsVersion)|util.quarkusRef(quarkusVersion)|ck.branch(pageComponentVersion)",
 requires={requires},transform=util.sortCompatibilityItems]
+indexTable::[version="*",relative="running/running.adoc",cellformats="util.ckRef(pageComponentDisplayVersion,
 
pageComponentVersion)|lastReleasedVersion|camelKRuntimeVersion|util.camelQuarkusRef(camelQuarkusVersion,
 camelQuarkusDocsVersion)|util.camelRef(camelVersion, 
camelDocsVersion)|util.quarkusRef(quarkusVersion)|ck.branch(pageComponentVersion)",
 requires={requires},transform=util.sortCompatibilityItems]
 
 == Other APIs version matrix
 
diff --git a/docs/modules/ROOT/pages/installation/installation.adoc 
b/docs/modules/ROOT/pages/installation/installation.adoc
index d54bdef8a..7ea8725f2 100644
--- a/docs/modules/ROOT/pages/installation/installation.adoc
+++ b/docs/modules/ROOT/pages/installation/installation.adoc
@@ -15,10 +15,10 @@ https://kustomize.io[Kustomize] provides a declarative 
approach to the configura
 
 ```
 $ kubectl create ns camel-k
-$ kubectl apply -k 
github.com/apache/camel-k/install/overlays/kubernetes/descoped?ref=v2.4.0 
--server-side
+$ kubectl apply -k 
github.com/apache/camel-k/install/overlays/kubernetes/descoped?ref=v{last-released-version}
 --server-side
 ```
 
-You can specify as `ref` parameter the version you're willing to install (ie, 
`v2.4.0`). The command above will install a descoped (global) operator in the 
camel-k namespace. This is the suggested configuration in order to manage 
Integrations in all namespaces.
+You can specify as `ref` parameter the version you're willing to install (ie, 
`v{last-released-version}`). The command above will install a descoped (global) 
operator in the camel-k namespace. This is the suggested configuration in order 
to manage Integrations in all namespaces.
 
 [[helm]]
 === Installation via Helm Hub
diff --git a/script/update_docs.sh b/script/update_docs.sh
index 41438ce9c..88afc9f5d 100755
--- a/script/update_docs.sh
+++ b/script/update_docs.sh
@@ -18,6 +18,7 @@
 location=$(dirname $0)
 
 echo "Scraping information from Makefile"
+LAST_RELEASED_VERSION=$(grep '^LAST_RELEASED_VERSION ?= ' Makefile | sed 
's/^.* \?= //')
 RUNTIME_VERSION=$(grep '^DEFAULT_RUNTIME_VERSION := ' Makefile | sed 's/^.* 
\?= //')
 
 
CATALOG="$location/../pkg/resources/resources/camel-catalog-$RUNTIME_VERSION.yaml"
@@ -52,11 +53,13 @@ fi
 CAMEL_QUARKUS_DOCS_VERSION="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.x"
 QUARKUS_VERSION=$(yq '.spec.runtime.metadata."quarkus.version"' $CATALOG)
 
+echo "Camel K latest version: $LAST_RELEASED_VERSION"
 echo "Camel K Runtime version: $RUNTIME_VERSION"
 echo "Camel version: $CAMEL_VERSION"
 echo "Camel Quarkus version: $CAMEL_QUARKUS_VERSION"
 echo "Quarkus version: $QUARKUS_VERSION"
 
+yq -i ".asciidoc.attributes.last-released-version = 
\"$LAST_RELEASED_VERSION\"" $location/../docs/antora.yml
 yq -i ".asciidoc.attributes.camel-k-runtime-version = \"$RUNTIME_VERSION\"" 
$location/../docs/antora.yml
 yq -i ".asciidoc.attributes.camel-version = \"$CAMEL_VERSION\"" 
$location/../docs/antora.yml
 yq -i ".asciidoc.attributes.camel-docs-version = \"$CAMEL_DOCS_VERSION\"" 
$location/../docs/antora.yml

Reply via email to