Class: HighFive::Thor::Tasks::IosTasks

Inherits:
HighFive::Thor::Task show all
Includes:
IosHelper, Thor::Actions
Defined in:
lib/high_five/thor/tasks/ios_tasks.rb

Instance Method Summary collapse

Methods included from IosHelper

#info_plist_path, uuid_from_mobileprovision, #xcodeproj_path

Methods inherited from HighFive::Thor::Task

banner, #initialize

Constructor Details

This class inherits a constructor from HighFive::Thor::Task

Instance Method Details

#build ⇒ Object



37
38
39
# File 'lib/high_five/thor/tasks/ios_tasks.rb', line 37

def build
 
end

#set_version ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/high_five/thor/tasks/ios_tasks.rb', line 16

def set_version
  info = info_plist_path(options[:target])
  puts "Using #{info}"
  plist = Plist::parse_xml(info)

  if (options[:version])
    puts "Changing version from #{plist["CFBundleShortVersionString"]} => #{options[:version]}"
    plist["CFBundleShortVersionString"] = options[:version]
  end

  if (options[:build_number])
    puts "Changind build number from #{plist["CFBundleVersion"]} => #{options[:build_number]}"
    plist["CFBundleVersion"] = options[:build_number]
  end
  File.open(info, 'w') do |f|
    f.write(Plist::Emit.dump(plist))
  end
  puts "Wrote Info.plist succesfully"
end