Skip to content

Commit

Permalink
chore(docs): kamelet reference cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
squakez committed Sep 17, 2024
1 parent fa10c8d commit 834ac75
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 122 deletions.
2 changes: 0 additions & 2 deletions docs/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ asciidoc:
attributes:
requires: "'util=camel-website-util,ck=xref:js/ck.js'"
prerelease: true
camel-kamelets-version: '4.4.1'
camel-kamelets-docs-version: 4.4.x
camel-k-runtime-version: 3.8.1
camel-api-versions: camel.apache.org/v1 camel.apache.org/v1alpha1 # from Makefile BUNDLE_CAMEL_APIS
camel-version: 4.4.1
Expand Down
10 changes: 2 additions & 8 deletions docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ The integration code will immediately run in the cloud. Continue reading the doc

== Camel dependencies matrix
--
ifdef::lts[This is a long term service release.]
ifndef::lts[]
ifdef::prerelease[This is a development version of {page-component-title}. It should not be used in production.]
ifndef::prerelease[This release will not be updated, but rather replaced by a new release.]
endif::[]
ifdef::prerelease[NOTE: This is a development version of {page-component-title}. It should not be used in production.]
--

From Camel K version 2 onward you will be able to use any Camel K Runtime. Each runtime depends on a Camel Quarkus, Camel and Quarkus Platform version. Every Camel K has a default runtime used, but you can xref:configuration/runtime-version.adoc[pick any Camel K Runtime available] (backward and forward compatible).
Expand All @@ -54,13 +50,11 @@ From Camel K version 2 onward you will be able to use any Camel K Runtime. Each
|Camel Quarkus
|Camel
|Quarkus
|Kamelets
|LTS
|Branch
|===

//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)|util.kameletsRef(camelKameletsVersion, camelKameletsDocsVersion)|lts|ck.branch(pageComponentVersion)", requires={requires},transform=util.sortCompatibilityItems]
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]

== Other APIs version matrix

Expand Down
5 changes: 0 additions & 5 deletions script/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -530,11 +530,6 @@ release-nightly: cross-compile images-push
release-helm:
./script/release_helm.sh ${VERSION}

release-kustomize:
RELEASE_VERSION=$(CUSTOM_VERSION) \
RELEASE_NAME=$(PACKAGE) \
./script/release_kustomize.sh

.PHONY: do-build build build-kamel build-kamel-platform build-resources dep codegen images images-push images-push-staging image-build test check clean release cross-compile package-examples set-version git-tag check-licenses build-resources release-helm release-staging release-nightly get-staging-repo get-version
.PHONY: controller-gen kubectl kustomize operator-sdk opm

Expand Down
74 changes: 0 additions & 74 deletions script/release_kustomize.sh

This file was deleted.

18 changes: 1 addition & 17 deletions script/update_default_camel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,5 @@ git clone --depth 1 https://github.com/apache/camel-k-runtime.git /tmp/camel-k-r
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/^DEFAULT_RUNTIME_VERSION := .*$/DEFAULT_RUNTIME_VERSION := $ck_runtime_version/" $location/Makefile
camel_version=$(grep -oPm1 "(?<=<camel-version>)[^<]+" /tmp/camel-k-runtime/pom.xml)

rm -rf /tmp/camel-kamelets
git clone https://github.com/apache/camel-kamelets.git /tmp/camel-kamelets
pushd /tmp/camel-kamelets
echo "INFO: Looking a suitable Kamelet tag for $camel_version camel version"
kamelets_tag=$(git tag | grep $camel_version | sort -r | head -n 1)

if [[ $kamelets_tag == "" ]]; then
echo "INFO: no tag found for $camel_version camel version. Fallback to main branch."
kamelets_tag="main"
fi

popd
echo "INFO: Kamelets version set at $kamelets_tag"
sed -i "s/^KAMELET_CATALOG_REPO_TAG := .*$/KAMELET_CATALOG_REPO_TAG := $kamelets_tag/" $location/Makefile

rm -rf /tmp/camel-k-runtime/ /tmp/camel-kamelets
rm -rf /tmp/camel-k-runtime/
16 changes: 0 additions & 16 deletions script/update_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,9 @@ if [ ! -f $CATALOG ]; then
exit 1
fi

KAMELET_CATALOG_REPO_TAG=$(grep '^KAMELET_CATALOG_REPO_TAG := ' Makefile | sed 's/^.* \?= //')
KAMELETS_VERSION=$(echo $KAMELET_CATALOG_REPO_TAG | sed 's/^.//')
if [[ "$KAMELET_CATALOG_REPO_TAG" == "main" ]]; then
KAMELETS_VERSION="latest"
KAMELETS_DOCS_VERSION="next"
else
re="^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+).*$"
if ! [[ $KAMELETS_VERSION =~ $re ]]; then
echo "❗ argument must match semantic version: $KAMELETS_VERSION"
exit 1
fi
KAMELETS_DOCS_VERSION="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.x"
fi
KUSTOMIZE_VERSION=$(grep '^KUSTOMIZE_VERSION := ' Makefile | sed 's/^.* \?= //' | sed 's/^.//')

echo "Camel K Runtime version: $RUNTIME_VERSION"
echo "Kamelets version: $KAMELETS_VERSION"
echo "Kustomize version: $KUSTOMIZE_VERSION"

yq -i ".asciidoc.attributes.kustomize-version = \"$KUSTOMIZE_VERSION\"" $location/../docs/antora.yml
Expand Down Expand Up @@ -77,8 +63,6 @@ yq -i ".asciidoc.attributes.camel-docs-version = \"$CAMEL_DOCS_VERSION\"" $locat
yq -i ".asciidoc.attributes.camel-quarkus-version = \"$CAMEL_QUARKUS_VERSION\"" $location/../docs/antora.yml
yq -i ".asciidoc.attributes.camel-quarkus-docs-version = \"$CAMEL_QUARKUS_DOCS_VERSION\"" $location/../docs/antora.yml
yq -i ".asciidoc.attributes.quarkus-version = \"$QUARKUS_VERSION\"" $location/../docs/antora.yml
yq -i ".asciidoc.attributes.camel-kamelets-version = \"$KAMELETS_VERSION\"" $location/../docs/antora.yml
yq -i ".asciidoc.attributes.camel-kamelets-docs-version = \"$KAMELETS_DOCS_VERSION\"" $location/../docs/antora.yml

echo "Scraping information from go.mod"
KNATIVE_API_VERSION=$(grep '^.*knative.dev/eventing ' $location/../go.mod | sed 's/^.* //' | sed 's/^.//')
Expand Down

0 comments on commit 834ac75

Please sign in to comment.