Class: Tug::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/tug/command/command.rb

Direct Known Subclasses

BuildCommand, IpaCommand, ProvisionCommand

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.command_for_string(command_string) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/tug/command/command.rb', line 5

def command_for_string(command_string)
  case command_string
  when "build"
    Tug::BuildCommand.new
  when "ipa"
    Tug::IpaCommand.new
  when "provision"
    Tug::ProvisionCommand.new
  when "deploy"
    Tug::DeployCommand.new
  else
    Tug::Command.new
  end
end

Instance Method Details

#execute(config_file) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/tug/command/command.rb', line 21

def execute(config_file)
  project = config_file.project
  @xctool = xctool(project.ipa_config)
  project.schemes.each do |scheme|
    @xctool.build(project.workspace, scheme)
  end
end