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 efa673a50 chore: deprecated commands
efa673a50 is described below

commit efa673a50d85c1224bc7ec8abeae3b2e0cf412ae
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Thu Nov 24 12:43:02 2022 +0100

    chore: deprecated commands
    
    * kamel local
    * kamel init
    
    Closes #3790
---
 pkg/cmd/init.go          | 9 +++++----
 pkg/cmd/local.go         | 1 +
 pkg/cmd/local_build.go   | 9 +++++----
 pkg/cmd/local_inspect.go | 3 ++-
 pkg/cmd/local_run.go     | 9 +++++----
 5 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/pkg/cmd/init.go b/pkg/cmd/init.go
index 59347482e..1187b23bb 100644
--- a/pkg/cmd/init.go
+++ b/pkg/cmd/init.go
@@ -36,10 +36,11 @@ func newCmdInit(rootCmdOptions *RootCmdOptions) 
(*cobra.Command, *initCmdOptions
                RootCmdOptions: rootCmdOptions,
        }
        cmd := cobra.Command{
-               Use:     "init [flags] IntegrationFile.java",
-               Short:   "Initialize empty Camel K files",
-               Long:    `Initialize empty Camel K integrations and other 
resources.`,
-               PreRunE: decode(&options),
+               Use:        "init [flags] IntegrationFile.java",
+               Short:      "Initialize empty Camel K files",
+               Long:       `Initialize empty Camel K integrations and other 
resources.`,
+               Deprecated: "consider using Camel JBang instead 
(https://camel.apache.org/manual/camel-jbang.html)",
+               PreRunE:    decode(&options),
                RunE: func(cmd *cobra.Command, args []string) error {
                        if err := options.validate(cmd, args); err != nil {
                                return err
diff --git a/pkg/cmd/local.go b/pkg/cmd/local.go
index 70a0f7a15..da816af9a 100644
--- a/pkg/cmd/local.go
+++ b/pkg/cmd/local.go
@@ -42,6 +42,7 @@ func newCmdLocal(rootCmdOptions *RootCmdOptions) 
(*cobra.Command, *LocalCmdOptio
                Use:               "local [sub-command]",
                Short:             "Perform integration actions locally.",
                Long:              `Perform integration actions locally given a 
set of input integration files.`,
+               Deprecated:        "consider using Camel JBang instead 
(https://camel.apache.org/manual/camel-jbang.html)",
                PersistentPreRunE: options.persistentPreRun,
                Annotations: map[string]string{
                        offlineCommandLabel: "true",
diff --git a/pkg/cmd/local_build.go b/pkg/cmd/local_build.go
index 6bd124a1e..8ebb2e00c 100644
--- a/pkg/cmd/local_build.go
+++ b/pkg/cmd/local_build.go
@@ -33,10 +33,11 @@ func newCmdLocalBuild(localCmdOptions *LocalCmdOptions) 
(*cobra.Command, *localB
        }
 
        cmd := cobra.Command{
-               Use:     "build [options]",
-               Short:   "Build integration images locally.",
-               Long:    `Build integration images locally for containerized 
integrations.`,
-               PreRunE: decode(&options),
+               Use:        "build [options]",
+               Short:      "Build integration images locally.",
+               Long:       `Build integration images locally for containerized 
integrations.`,
+               Deprecated: "it may be removed in future versions",
+               PreRunE:    decode(&options),
                RunE: func(cmd *cobra.Command, args []string) error {
                        if err := options.validate(cmd, args); err != nil {
                                return err
diff --git a/pkg/cmd/local_inspect.go b/pkg/cmd/local_inspect.go
index 7b47e3374..7ffdf8af2 100644
--- a/pkg/cmd/local_inspect.go
+++ b/pkg/cmd/local_inspect.go
@@ -36,7 +36,8 @@ func newCmdLocalInspect(localCmdOptions *LocalCmdOptions) 
(*cobra.Command, *loca
                Long: `Output dependencies for a list of integration files. By 
default this command returns the
 top level dependencies only. When --all-dependencies is enabled, the 
transitive dependencies
 will be generated by calling Maven and then printed in the selected output 
format.`,
-               PreRunE: decode(&options),
+               Deprecated: "it may be removed in future versions",
+               PreRunE:    decode(&options),
                RunE: func(cmd *cobra.Command, args []string) error {
                        if err := options.validate(args); err != nil {
                                return err
diff --git a/pkg/cmd/local_run.go b/pkg/cmd/local_run.go
index e88ff0903..c9bf2ff88 100644
--- a/pkg/cmd/local_run.go
+++ b/pkg/cmd/local_run.go
@@ -35,10 +35,11 @@ func newCmdLocalRun(localCmdOptions *LocalCmdOptions) 
(*cobra.Command, *localRun
        }
 
        cmd := cobra.Command{
-               Use:     "run [integration files]",
-               Short:   "Run integration locally.",
-               Long:    `Run integration locally using the input integration 
files.`,
-               PreRunE: decode(&options),
+               Use:        "run [integration files]",
+               Short:      "Run integration locally.",
+               Long:       `Run integration locally using the input 
integration files.`,
+               Deprecated: "consider using Camel JBang instead 
(https://camel.apache.org/manual/camel-jbang.html)",
+               PreRunE:    decode(&options),
                RunE: func(cmd *cobra.Command, args []string) error {
                        if err := options.validate(args); err != nil {
                                return err

Reply via email to