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 6967f46b6 chore(cmd): deprecate -d file feature
6967f46b6 is described below

commit 6967f46b6fec31fc7ec7c7208d2b9ce20518cdd6
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Wed Feb 14 12:16:39 2024 +0100

    chore(cmd): deprecate -d file feature
---
 pkg/cmd/run.go | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go
index 589565ce7..9403f76cd 100644
--- a/pkg/cmd/run.go
+++ b/pkg/cmd/run.go
@@ -818,6 +818,7 @@ func (o *runCmdOptions) applyDependencies(cmd 
*cobra.Command, c client.Client, i
        var platform *v1.IntegrationPlatform
        var catalog *camel.RuntimeCatalog
        for _, item := range o.Dependencies {
+               // Deprecated: won't be supported in future releases
                if strings.HasPrefix(item, "file://") || 
strings.HasPrefix(item, "http://";) || strings.HasPrefix(item, "https://";) {
                        if platform == nil {
                                var err error
@@ -826,6 +827,7 @@ func (o *runCmdOptions) applyDependencies(cmd 
*cobra.Command, c client.Client, i
                                        return err
                                }
                        }
+                       fmt.Fprintf(cmd.ErrOrStderr(), "Warning: this feature 
is deprecated and may disappear in future release. Use jvm trait instead.\n")
                        if err := o.uploadDependency(platform, item, name, cmd, 
it); err != nil {
                                return fmt.Errorf("error trying to upload %s to 
the Image Registry.: %w", item, err)
                        }
@@ -834,7 +836,7 @@ func (o *runCmdOptions) applyDependencies(cmd 
*cobra.Command, c client.Client, i
                                // The catalog used for lightweight validation 
of Camel components.
                                // The exact runtime version is not used here 
since resolving the runtime version may be
                                // a costly operation and most of the use cases 
should be covered by the default catalog.
-                               // And the validation only warns potential 
misusages of Camel components at the CLI level,
+                               // And the validation only warns potential 
misusage of Camel components at the CLI level,
                                // so strictness of catalog version is not 
necessary here.
                                var err error
                                catalog, err = createCamelCatalog(o.Context)
@@ -1008,6 +1010,7 @@ func (o *runCmdOptions) getTargetPath() string {
        return o.RegistryOptions.Get("targetPath")
 }
 
+// Deprecated: won't be supported in future releases.
 func (o *runCmdOptions) uploadDependency(platform *v1.IntegrationPlatform, 
item string, integrationName string, cmd *cobra.Command, integration 
*v1.Integration) error {
        var localPath string
        if strings.HasPrefix(item, "http://";) || strings.HasPrefix(item, 
"https://";) {

Reply via email to