Class: Gym::PackageCommandGeneratorXcode7
- Inherits:
-
Object
- Object
- Gym::PackageCommandGeneratorXcode7
- Defined in:
- lib/gym/generators/package_command_generator_xcode7.rb
Overview
Responsible for building the fully working xcodebuild command
Class Method Summary collapse
-
.config_path ⇒ Object
The path the config file we use to sign our app.
-
.dsym_path ⇒ Object
The path the the dsym file for this app.
- .generate ⇒ Object
- .ipa_path ⇒ Object
- .options ⇒ Object
- .pipe ⇒ Object
-
.temporary_output_path ⇒ Object
We export the ipa into this directory, as we can’t specify the ipa file directly.
Class Method Details
.config_path ⇒ Object
The path the config file we use to sign our app
58 59 60 61 |
# File 'lib/gym/generators/package_command_generator_xcode7.rb', line 58 def config_path Gym.cache[:config_path] ||= "/tmp/gym_config_#{Time.now.to_i}.plist" return Gym.cache[:config_path] end |
.dsym_path ⇒ Object
The path the the dsym file for this app. Might be nil
53 54 55 |
# File 'lib/gym/generators/package_command_generator_xcode7.rb', line 53 def dsym_path Dir[BuildCommandGenerator.archive_path + "/**/*.app.dSYM"].last end |
.generate ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/gym/generators/package_command_generator_xcode7.rb', line 10 def generate print_legacy_information unless Helper.fastlane_enabled? parts = ["/usr/bin/xcrun xcodebuild -exportArchive"] parts += parts += pipe File.write(config_path, config_content) # overwrite everytime. Could be optimized parts end |
.ipa_path ⇒ Object
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/gym/generators/package_command_generator_xcode7.rb', line 41 def ipa_path unless Gym.cache[:ipa_path] path = Dir[File.join(temporary_output_path, "*.ipa")].last ErrorHandler.handle_empty_archive unless path Gym.cache[:ipa_path] = File.join(temporary_output_path, "#{Gym.config[:output_name]}.ipa") FileUtils.mv(path, Gym.cache[:ipa_path]) if File.(path).downcase != File.(Gym.cache[:ipa_path]).downcase end Gym.cache[:ipa_path] end |
.options ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/gym/generators/package_command_generator_xcode7.rb', line 22 def = [] << "-exportOptionsPlist '#{config_path}'" << "-archivePath '#{BuildCommandGenerator.archive_path}'" << "-exportPath '#{temporary_output_path}'" end |
.pipe ⇒ Object
32 33 34 |
# File 'lib/gym/generators/package_command_generator_xcode7.rb', line 32 def pipe [""] end |
.temporary_output_path ⇒ Object
We export the ipa into this directory, as we can’t specify the ipa file directly
37 38 39 |
# File 'lib/gym/generators/package_command_generator_xcode7.rb', line 37 def temporary_output_path Gym.cache[:temporary_output_path] ||= File.join("/tmp", Time.now.to_i.to_s) end |