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
52 53 54 55 |
# File 'lib/gym/generators/package_command_generator_xcode7.rb', line 52 def config_path @config_path ||= "/tmp/gym_config_#{Time.now.to_i}.plist" return @config_path end |
.dsym_path ⇒ Object
The path the the dsym file for this app. Might be nil
47 48 49 |
# File 'lib/gym/generators/package_command_generator_xcode7.rb', line 47 def dsym_path Dir[BuildCommandGenerator.archive_path + "/**/*.app.dSYM"].last end |
.generate ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/gym/generators/package_command_generator_xcode7.rb', line 5 def generate print_legacy_information 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
36 37 38 39 40 41 42 43 44 |
# File 'lib/gym/generators/package_command_generator_xcode7.rb', line 36 def ipa_path unless @ipa_path path = Dir[File.join(temporary_output_path, "*.ipa")].last @ipa_path = File.join(temporary_output_path, "#{Gym.config[:output_name]}.ipa") FileUtils.mv(path, @ipa_path) if File.(path) != File.(@ipa_path) end @ipa_path end |
.options ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/gym/generators/package_command_generator_xcode7.rb', line 17 def = [] << "-exportOptionsPlist '#{config_path}'" << "-archivePath '#{BuildCommandGenerator.archive_path}'" << "-exportPath '#{temporary_output_path}'" end |
.pipe ⇒ Object
27 28 29 |
# File 'lib/gym/generators/package_command_generator_xcode7.rb', line 27 def pipe [""] end |
.temporary_output_path ⇒ Object
We export the ipa into this directory, as we can’t specify the ipa file directly
32 33 34 |
# File 'lib/gym/generators/package_command_generator_xcode7.rb', line 32 def temporary_output_path @temporary_output_path ||= File.join("/tmp", Time.now.to_i.to_s) end |