Method: Fanta::BuildEnvironment#initialize
- Defined in:
- lib/fanta/build_environment.rb
#initialize(options) ⇒ BuildEnvironment
Returns a new instance of BuildEnvironment.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/fanta/build_environment.rb', line 14 def initialize @options = [:info_plist] ||= 'Resources/Info.plist' [:version] ||= Plist::parse_xml([:info_plist])['CFBundleVersion'] [:project_name] ||= xcodebuild_list.first.scan(/project\s\"([^\"]+)/i).flatten.first [:full_name] ||= "#{self[:project_name]} #{self[:version]}" [:build_dir] ||= 'build' [:sdk] ||= 'iphoneos' [:configuration] ||= 'Release' [:target] ||= targets.first [:app_file] ||= self[:project_name] [:target_or_scheme] ||= 'target' if [:ipa_name] [:ipa_file] ||= File.join self[:build_dir], [self[:project_name], self[:version], self[:configuration], self[:ipa_name]].join("-") + ".ipa" [:dsym_file] ||= File.join self[:build_dir], [self[:project_name], self[:version], self[:configuration], self[:ipa_name]].join("-") + ".dSYM.zip" end end |