Method: VMC::Cli::Command::Apps#push

Defined in:
lib/cli/commands/apps.rb

#push(appname = nil) ⇒ Object



390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
# File 'lib/cli/commands/apps.rb', line 390

def push(appname=nil)
  unless no_prompt || @options[:path]
    proceed = ask(
      'Would you like to deploy from the current directory?',
      :default => true
    )

    unless proceed
      @path = ask('Deployment path')
    end
  end

  pushed = false
  each_app(false) do |name|
    display "Pushing application '#{name}'..." if name
    do_push(name)
    pushed = true
  end

  unless pushed
    @application = @path
    do_push(appname)
  end
end