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

gansheer 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 60beb6b25 chore(ci): lint upgrade
60beb6b25 is described below

commit 60beb6b2560b914ce8c2b5dff9f69d36aa6ce39d
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Fri Oct 9 15:57:30 2026 +0200

    chore(ci): lint upgrade
---
 go.mod                |  2 +-
 go.sum                |  4 ++--
 pkg/util/util.go      |  6 +++---
 script/Makefile       | 15 ++++++---------
 script/get_catalog.sh | 48 ------------------------------------------------
 5 files changed, 12 insertions(+), 63 deletions(-)

diff --git a/go.mod b/go.mod
index eb00e971c..4d15f8441 100644
--- a/go.mod
+++ b/go.mod
@@ -117,7 +117,7 @@ require (
        go.yaml.in/yaml/v3 v3.0.5 // indirect
        golang.org/x/crypto v0.57.0 // indirect
        golang.org/x/mod v0.41.0 // indirect
-       golang.org/x/net v0.59.0 // indirect
+       golang.org/x/net v0.60.0 // indirect
        golang.org/x/sys v0.48.0 // indirect
        golang.org/x/tools v0.49.0 // indirect
        gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
diff --git a/go.sum b/go.sum
index dd99d1c8e..98c773883 100644
--- a/go.sum
+++ b/go.sum
@@ -277,8 +277,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod 
h1:z5CRVTTTmAJ677TzLL
 golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod 
h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod 
h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
 golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod 
h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.59.0 h1:5zfYln+w5XCxwrnMMJPufRgNoXEaGxl0wo5GqPXyues=
-golang.org/x/net v0.59.0/go.mod h1:2DA/G1UfVbCpQPeWTmMPGY7Cs2PkBkwu743bVX5PIVg=
+golang.org/x/net v0.60.0 h1:79p50tfZlm0J9YfoDsSi639qSXNGVwEzOPLCxM2FsYU=
+golang.org/x/net v0.60.0/go.mod h1:2DA/G1UfVbCpQPeWTmMPGY7Cs2PkBkwu743bVX5PIVg=
 golang.org/x/oauth2 v0.37.0 h1:JUlcxA8oAtauLfiH8FX2/FkAWHAdi0QtGCGc+hofE98=
 golang.org/x/oauth2 v0.37.0/go.mod 
h1:IxwZNxUULJmpBFf9K/9NTMSIfZZuvuTy1gGxhigP/58=
 golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod 
h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
diff --git a/pkg/util/util.go b/pkg/util/util.go
index 81d74044e..b92d6ed4f 100644
--- a/pkg/util/util.go
+++ b/pkg/util/util.go
@@ -121,9 +121,9 @@ func StringSliceUniqueConcat(slice *[]string, items 
[]string) bool {
 }
 
 func SubstringBefore(s string, substr string) string {
-       index := strings.LastIndex(s, substr)
-       if index != -1 {
-               return s[:index]
+       before, _, ok := strings.CutLast(s, substr)
+       if ok {
+               return before
        }
 
        return ""
diff --git a/script/Makefile b/script/Makefile
index 19656cd0e..4ac1ec8c9 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -46,7 +46,7 @@ LINTER ?= $(LOCALBIN)/golangci-lint
 DEADCODE ?= $(LOCALBIN)/deadcode
 GOVULNCHECK ?= $(LOCALBIN)/govulncheck
 GOIMPORT ?= $(LOCALBIN)/goimports
-LINTER_VERSION ?= v2.13.2
+LINTER_VERSION ?= v2.14.0
 GOVULNCHECK_VERSION ?= v1.8.0
 GOIMPORTS_VERSION ?= v0.50.0
 GOTESTFMT_VERSION ?= v2.5.0
@@ -163,7 +163,7 @@ endef
 export LICENSE_HEADER
 default: build
 
-update-docs: build-resources
+update-docs:
        ./script/update_docs.sh
 
 bump-replace:
@@ -242,7 +242,7 @@ codegen-tools-install:
        go install k8s.io/code-generator/cmd/informer-gen@$(CODEGEN_VERSION)
        go install 
sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_GEN_VERSION)
 
-build: codegen build-resources test build-kamel build-compile-integration-tests
+build: codegen test build-kamel build-compile-integration-tests
 
 build-platform: build build-kamel-platform
 
@@ -385,9 +385,6 @@ ifneq ($(shell uname -s 2>/dev/null || echo Unknown),Linux)
        ln -sf build/_output/bin/kamel-$(IMAGE_ARCH) ./kamel
 endif
 
-build-resources:
-       ./script/get_catalog.sh $(CK_RUNTIME_CATALOG_VERSION)
-
 build-compile-integration-tests:
 ifndef NOTEST
        @echo "####### Compiling integration tests..."
@@ -591,13 +588,13 @@ cross-compile:
        # be processed as a single argument by the cross compile script
        ./script/cross_compile.sh $(CUSTOM_VERSION) $(subst ","\",$(GOFLAGS))
 
-release-staging: clean codegen set-version check-licenses build-resources 
images-all images-tag-staging-all images-push-staging-all cross-compile 
release-helm bundle-push-staging git-tag sbomgen
+release-staging: clean codegen set-version check-licenses images-all 
images-tag-staging-all images-push-staging-all cross-compile release-helm 
bundle-push-staging git-tag sbomgen
 
 sbomgen:
        cyclonedx-gomod mod -licenses -json -output sbom.json
 
 # Build images
-images-nightly: clean codegen set-version build-resources images-all
+images-nightly: clean codegen set-version images-all
 
 # Release artifacts
 release-nightly: cross-compile images-push-all
@@ -606,7 +603,7 @@ release-helm:
        ./script/set_version.sh ${VERSION}
        ./script/release_helm.sh ${VERSION}
 
-.PHONY: do-build build build-kamel build-kamel-platform build-resources dep 
codegen images images-push 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: do-build build build-kamel build-kamel-platform dep codegen images 
images-push image-build test check clean release cross-compile package-examples 
set-version git-tag check-licenses release-helm release-staging release-nightly 
get-staging-repo get-version
 .PHONY: kubectl kustomize operator-sdk opm
 
 kubectl:
diff --git a/script/get_catalog.sh b/script/get_catalog.sh
deleted file mode 100755
index e7fbb2817..000000000
--- a/script/get_catalog.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/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)
-rootdir=$location/../
-
-if [ "$#" -lt 1 ]; then
-  echo "usage: $0 <Camel K runtime version> [<staging repository>]"
-  exit 1
-fi
-runtime_version="$1"
-
-if [ ! -z $2 ]; then
-  # Change the settings to include the staging repo if it's not already there
-  echo "INFO: updating the settings staging repository"
-  sed -i.bak 
"s;<url>https://repository\.apache\.org/content/repositories/orgapachecamel-.*</url>;<url>$2</url>;"
 $location/maven-settings.xml
-  rm $location/maven-settings.xml.bak
-fi
-
-# Refresh catalog sets. We can clean any leftover as well.
-rm -f ${rootdir}/pkg/resources/resources/camel-catalog-*
-
-mvn -q dependency:copy 
-Dartifact="org.apache.camel.k:camel-k-catalog:$runtime_version:yaml:catalog" \
-  -Dmdep.useBaseVersion=true \
-  -DoutputDirectory=${rootdir}/resources/ \
-  -s $location/maven-settings.xml \
-  -Papache
-
-if [ -f "${rootdir}/resources/camel-k-catalog-${runtime_version}-catalog.yaml" 
]; then
-    mv ${rootdir}/resources/camel-k-catalog-"${runtime_version}"-catalog.yaml 
${rootdir}/pkg/resources/resources/camel-catalog-"${runtime_version}".yaml
-fi
-

Reply via email to