Skip to content

Commit

Permalink
feat: Add deprecation message to okteto push command (#2268)
Browse files Browse the repository at this point in the history
Signed-off-by: Javier López Barba <javier@okteto.com>
  • Loading branch information
jLopezbarb committed Mar 7, 2022
1 parent f49b132 commit 79daee5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,14 @@ type pushOptions struct {
func Push(ctx context.Context) *cobra.Command {
pushOpts := &pushOptions{}
cmd := &cobra.Command{
Hidden: true,
Use: "push [svc]",
Short: "Build, push and redeploy source code to the target app",
Args: utils.MaximumNArgsAccepted(1, "https://okteto.com/docs/reference/cli/#push"),
Hidden: true,
RunE: func(cmd *cobra.Command, args []string) error {

if !utils.LoadBoolean(model.OktetoWithinDeployCommandContextEnvVar) {
oktetoLog.Warning("'okteto push' is deprecated in favor of 'okteto deploy', and will be removed in a future version")
}
ctxResource, err := utils.LoadManifestContext(pushOpts.DevPath)
if err != nil {
if oktetoErrors.IsNotExist(err) && len(pushOpts.AppName) > 0 {
Expand Down

0 comments on commit 79daee5

Please sign in to comment.