Module: DeployGate::Commands::Deploy

Defined in:
lib/deploygate/commands/deploy.rb,
lib/deploygate/commands/deploy/push.rb,
lib/deploygate/commands/deploy/build.rb

Defined Under Namespace

Classes: Build, Push

Class Method Summary collapse

Class Method Details

.run(args, options) ⇒ Object

Parameters:

  • args (Array)
  • options (Commander::Command::Options)


8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/deploygate/commands/deploy.rb', line 8

def run(args, options)
  Login.() unless DeployGate::Session.new.login?

  # push or build(android/ios)
  args.push(Dir.pwd) if args.empty?

  work_file_path = args.first
  if File.directory?(work_file_path)
    Build.run(args, options)
  else
    # file upload
    Push.upload(args, options)
  end
end