This is an automated email from the ASF dual-hosted git repository. tsato 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 c06d2588e #3321: Fixes pre-bundle rule in Makefile c06d2588e is described below commit c06d2588e03896a63ece518c6ea2585cc103418f Author: phantomjinx <p.g.richard...@phantomjinx.co.uk> AuthorDate: Wed Jun 8 17:02:57 2022 +0100 #3321: Fixes pre-bundle rule in Makefile * Stops duplicate replaces lines being added. --- config/manifests/bases/camel-k.clusterserviceversion.yaml | 1 - script/Makefile | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config/manifests/bases/camel-k.clusterserviceversion.yaml b/config/manifests/bases/camel-k.clusterserviceversion.yaml index a526b4ae9..e6b1524ef 100644 --- a/config/manifests/bases/camel-k.clusterserviceversion.yaml +++ b/config/manifests/bases/camel-k.clusterserviceversion.yaml @@ -153,7 +153,6 @@ spec: minKubeVersion: 1.11.0 provider: name: The Apache Software Foundation - replaces: camel-k-operator.v1.9.2 selector: matchLabels: name: camel-k-operator diff --git a/script/Makefile b/script/Makefile index ee9ca2a32..dbbc4a4bd 100644 --- a/script/Makefile +++ b/script/Makefile @@ -523,9 +523,11 @@ pre-bundle: @sed -i 's/^ support: .*/ support: $(CSV_SUPPORT)/' $(CSV_PATH) @sed -i 's/^ name: .*.\(v.*\)/ name: $(CSV_NAME)/' $(CSV_PATH) @sed -i 's/^ displayName: .*/ displayName: $(CSV_DISPLAY_NAME)/' $(CSV_PATH) - @sed -i 's/^ replaces: .*/ replaces: $(CSV_REPLACES)/' $(CSV_PATH) @sed -i 's/^ version: .*/ version: $(CSV_VERSION)/' $(CSV_PATH) - @sed -i '/ version: ${CSV_VERSION}/a \ \ replaces: $(CSV_REPLACES)' $(CSV_PATH) + @if grep -q replaces config/manifests/bases/camel-k.clusterserviceversion.yaml; \ + then sed -i 's/^ replaces: .*/ replaces: $(CSV_REPLACES)/' $(CSV_PATH); \ + else sed -i '/ version: ${CSV_VERSION}/a \ \ replaces: $(CSV_REPLACES)' $(CSV_PATH); \ + fi bundle: set-version generate-crd $(BUNDLE_CAMEL_APIS) kustomize operator-sdk pre-bundle @# Display BUNDLE_METADATA_OPTS for debugging