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
60 61 62 63 |
# File 'lib/gym/generators/package_command_generator_xcode7.rb', line 60 def config_path Gym.cache[:config_path] ||= "#{Tempfile.new('gym').path}_config.plist" return Gym.cache[:config_path] end |
.dsym_path ⇒ Object
The path the the dsym file for this app. Might be nil
55 56 57 |
# File 'lib/gym/generators/package_command_generator_xcode7.rb', line 55 def dsym_path Dir[BuildCommandGenerator.archive_path + "/**/*.app.dSYM"].last end |
.generate ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/gym/generators/package_command_generator_xcode7.rb', line 12 def generate print_legacy_information unless Helper.fastlane_enabled? parts = ["/usr/bin/xcrun #{XcodebuildFixes.wrap_xcodebuild} -exportArchive"] parts += parts += pipe File.write(config_path, config_content) # overwrite everytime. Could be optimized parts end |
.ipa_path ⇒ Object
43 44 45 46 47 48 49 50 51 52 |
# File 'lib/gym/generators/package_command_generator_xcode7.rb', line 43 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
24 25 26 27 28 29 30 31 32 |
# File 'lib/gym/generators/package_command_generator_xcode7.rb', line 24 def = [] << "-exportOptionsPlist '#{config_path}'" << "-archivePath '#{BuildCommandGenerator.archive_path}'" << "-exportPath '#{temporary_output_path}'" end |
.pipe ⇒ Object
34 35 36 |
# File 'lib/gym/generators/package_command_generator_xcode7.rb', line 34 def pipe [""] end |
.temporary_output_path ⇒ Object
We export the ipa into this directory, as we can’t specify the ipa file directly
39 40 41 |
# File 'lib/gym/generators/package_command_generator_xcode7.rb', line 39 def temporary_output_path Gym.cache[:temporary_output_path] ||= "#{Tempfile.new('gym').path}.gym_output" end |