fastlane 2.14.2 → 2.15.0.beta.20170213032052

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/cert/lib/cert/commands_generator.rb +1 -1
  3. data/cert/lib/cert/runner.rb +1 -1
  4. data/credentials_manager/lib/credentials_manager/appfile_config.rb +1 -1
  5. data/deliver/lib/deliver/commands_generator.rb +1 -1
  6. data/deliver/lib/deliver/runner.rb +2 -2
  7. data/deliver/lib/deliver/setup.rb +4 -2
  8. data/fastlane/lib/fastlane/actions/actions_helper.rb +1 -1
  9. data/fastlane/lib/fastlane/actions/add_extra_platforms.rb +45 -0
  10. data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +13 -7
  11. data/fastlane/lib/fastlane/actions/crashlytics.rb +2 -2
  12. data/fastlane/lib/fastlane/actions/ensure_no_debug_code.rb +13 -1
  13. data/fastlane/lib/fastlane/actions/git_tag_exists.rb +1 -1
  14. data/fastlane/lib/fastlane/actions/hockey.rb +117 -14
  15. data/fastlane/lib/fastlane/actions/slack.rb +1 -1
  16. data/fastlane/lib/fastlane/cli_tools_distributor.rb +4 -0
  17. data/fastlane/lib/fastlane/commands_generator.rb +12 -12
  18. data/fastlane/lib/fastlane/documentation/docs_generator.rb +1 -1
  19. data/fastlane/lib/fastlane/environment_printer.rb +2 -2
  20. data/fastlane/lib/fastlane/fastlane_require.rb +1 -1
  21. data/fastlane/lib/fastlane/helper/git_helper.rb +22 -15
  22. data/fastlane/lib/fastlane/lane_manager.rb +2 -2
  23. data/fastlane/lib/fastlane/plugins/plugin_info_collector.rb +2 -2
  24. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +5 -5
  25. data/fastlane/lib/fastlane/runner.rb +12 -9
  26. data/fastlane/lib/fastlane/setup/crashlytics_beta_ui.rb +1 -4
  27. data/fastlane/lib/fastlane/supported_platforms.rb +17 -7
  28. data/fastlane/lib/fastlane/version.rb +1 -1
  29. data/fastlane_core/lib/fastlane_core.rb +1 -0
  30. data/fastlane_core/lib/fastlane_core/cert_checker.rb +3 -3
  31. data/fastlane_core/lib/fastlane_core/command_executor.rb +1 -1
  32. data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +7 -3
  33. data/fastlane_core/lib/fastlane_core/device_manager.rb +43 -16
  34. data/fastlane_core/lib/fastlane_core/globals.rb +27 -0
  35. data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +1 -1
  36. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +2 -4
  37. data/fastlane_core/lib/fastlane_core/keychain_importer.rb +1 -1
  38. data/fastlane_core/lib/fastlane_core/pkg_upload_package_builder.rb +1 -1
  39. data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +4 -4
  40. data/fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb +1 -1
  41. data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +22 -14
  42. data/fastlane_core/lib/fastlane_core/ui/interface.rb +5 -4
  43. data/frameit/README.md +4 -1
  44. data/frameit/lib/frameit/commands_generator.rb +1 -1
  45. data/frameit/lib/frameit/editor.rb +60 -13
  46. data/frameit/lib/frameit/runner.rb +1 -1
  47. data/gym/README.md +14 -0
  48. data/gym/lib/gym/commands_generator.rb +1 -1
  49. data/gym/lib/gym/error_handler.rb +2 -2
  50. data/gym/lib/gym/generators/package_command_generator_xcode7.rb +1 -1
  51. data/gym/lib/gym/runner.rb +3 -3
  52. data/gym/lib/gym/xcodebuild_fixes/package_application_fix.rb +2 -2
  53. data/gym/lib/gym/xcodebuild_fixes/swift_fix.rb +1 -1
  54. data/match/lib/match/commands_generator.rb +1 -1
  55. data/match/lib/match/encrypt.rb +3 -3
  56. data/match/lib/match/git_helper.rb +8 -8
  57. data/match/lib/match/options.rb +1 -1
  58. data/match/lib/match/utils.rb +3 -3
  59. data/pem/lib/pem/commands_generator.rb +1 -1
  60. data/pilot/lib/pilot/commands_generator.rb +1 -1
  61. data/produce/README.md +1 -1
  62. data/produce/lib/produce/commands_generator.rb +2 -2
  63. data/scan/lib/scan/commands_generator.rb +1 -1
  64. data/scan/lib/scan/options.rb +6 -0
  65. data/scan/lib/scan/runner.rb +2 -2
  66. data/scan/lib/scan/test_command_generator.rb +1 -0
  67. data/screengrab/lib/screengrab/commands_generator.rb +1 -1
  68. data/sigh/lib/sigh/commands_generator.rb +3 -3
  69. data/sigh/lib/sigh/local_manage.rb +1 -1
  70. data/sigh/lib/sigh/resign.rb +1 -1
  71. data/sigh/lib/sigh/runner.rb +8 -3
  72. data/snapshot/README.md +3 -3
  73. data/snapshot/lib/snapshot/collector.rb +1 -1
  74. data/snapshot/lib/snapshot/commands_generator.rb +1 -1
  75. data/snapshot/lib/snapshot/fixes/hardware_keyboard_fix.rb +1 -1
  76. data/snapshot/lib/snapshot/fixes/simulator_zoom_fix.rb +1 -1
  77. data/snapshot/lib/snapshot/reset_simulators.rb +2 -2
  78. data/snapshot/lib/snapshot/runner.rb +3 -3
  79. data/spaceship/lib/spaceship.rb +2 -0
  80. data/spaceship/lib/spaceship/base.rb +18 -0
  81. data/spaceship/lib/spaceship/client.rb +8 -5
  82. data/spaceship/lib/spaceship/globals.rb +12 -0
  83. data/spaceship/lib/spaceship/portal/app.rb +0 -6
  84. data/spaceship/lib/spaceship/portal/app_group.rb +0 -6
  85. data/spaceship/lib/spaceship/portal/device.rb +0 -6
  86. data/spaceship/lib/spaceship/portal/person.rb +0 -6
  87. data/spaceship/lib/spaceship/portal/portal.rb +1 -0
  88. data/spaceship/lib/spaceship/portal/portal_client.rb +37 -0
  89. data/spaceship/lib/spaceship/portal/spaceship.rb +9 -0
  90. data/spaceship/lib/spaceship/portal/website_push.rb +90 -0
  91. data/spaceship/lib/spaceship/tunes/app_image.rb +0 -6
  92. data/spaceship/lib/spaceship/tunes/app_ratings.rb +0 -9
  93. data/spaceship/lib/spaceship/tunes/app_screenshot.rb +0 -7
  94. data/spaceship/lib/spaceship/tunes/app_trailer.rb +0 -6
  95. data/spaceship/lib/spaceship/tunes/app_version.rb +1 -0
  96. data/spaceship/lib/spaceship/tunes/app_version_generated_promocodes.rb +0 -9
  97. data/spaceship/lib/spaceship/tunes/app_version_history.rb +0 -9
  98. data/spaceship/lib/spaceship/tunes/app_version_promocodes.rb +0 -9
  99. data/spaceship/lib/spaceship/tunes/app_version_ref.rb +0 -6
  100. data/spaceship/lib/spaceship/tunes/app_version_states_history.rb +0 -9
  101. data/spaceship/lib/spaceship/tunes/application.rb +0 -6
  102. data/spaceship/lib/spaceship/tunes/build.rb +0 -8
  103. data/spaceship/lib/spaceship/tunes/build_details.rb +0 -8
  104. data/spaceship/lib/spaceship/tunes/build_train.rb +0 -6
  105. data/spaceship/lib/spaceship/tunes/member.rb +0 -6
  106. data/spaceship/lib/spaceship/tunes/pricing_tier.rb +0 -9
  107. data/spaceship/lib/spaceship/tunes/recovery_device.rb +0 -6
  108. data/spaceship/lib/spaceship/tunes/territory.rb +0 -7
  109. data/spaceship/lib/spaceship/tunes/tester.rb +0 -6
  110. data/spaceship/lib/spaceship/tunes/transit_app_file.rb +0 -6
  111. data/spaceship/lib/spaceship/tunes/tunes_client.rb +2 -2
  112. data/spaceship/lib/spaceship/tunes/user_detail.rb +0 -6
  113. data/spaceship/lib/spaceship/tunes/version_set.rb +0 -11
  114. data/spaceship/lib/spaceship/two_step_client.rb +2 -2
  115. data/supply/lib/supply/commands_generator.rb +1 -1
  116. metadata +34 -17
@@ -96,7 +96,7 @@ module Gym
96
96
  # Builds the app and prepares the archive
97
97
  def build_app
98
98
  command = BuildCommandGenerator.generate
99
- print_command(command, "Generated Build Command") if $verbose
99
+ print_command(command, "Generated Build Command") if FastlaneCore::Globals.verbose?
100
100
  FastlaneCore::CommandExecutor.execute(command: command,
101
101
  print_all: true,
102
102
  print_command: !Gym.config[:silent],
@@ -119,7 +119,7 @@ module Gym
119
119
 
120
120
  def package_app
121
121
  command = PackageCommandGenerator.generate
122
- print_command(command, "Generated Package Command") if $verbose
122
+ print_command(command, "Generated Package Command") if FastlaneCore::Globals.verbose?
123
123
 
124
124
  FastlaneCore::CommandExecutor.execute(command: command,
125
125
  print_all: false,
@@ -168,7 +168,7 @@ module Gym
168
168
  # we have to remove it first, otherwise cp_r fails even with remove_destination
169
169
  # e.g.: there are symlinks in the .framework
170
170
  if File.exist?(existing_file)
171
- UI.important "Removing #{File.basename(f)} from output directory" if $verbose
171
+ UI.important "Removing #{File.basename(f)} from output directory" if FastlaneCore::Globals.verbose?
172
172
  FileUtils.rm_rf(existing_file)
173
173
  end
174
174
  FileUtils.cp_r(f, File.expand_path(Gym.config[:output_directory]), remove_destination: true)
@@ -29,11 +29,11 @@ module Gym
29
29
  Dir[File.join(Gym::ROOT, "lib/assets/package_application_patches/*.diff")].each do |patch|
30
30
  UI.verbose "Applying Package Application patch: #{File.basename(patch)}"
31
31
  command = ["patch '#{@patched_package_application_path}' < '#{patch}'"]
32
- Runner.new.print_command(command, "Applying Package Application patch: #{File.basename(patch)}") if $verbose
32
+ Runner.new.print_command(command, "Applying Package Application patch: #{File.basename(patch)}") if FastlaneCore::Globals.verbose?
33
33
 
34
34
  FastlaneCore::CommandExecutor.execute(command: command,
35
35
  print_all: false,
36
- print_command: $verbose,
36
+ print_command: FastlaneCore::Globals.verbose?,
37
37
  error: proc do |output|
38
38
  ErrorHandler.handle_package_error(output)
39
39
  end)
@@ -55,7 +55,7 @@ module Gym
55
55
  # Add "SwiftSupport" to the .ipa archive
56
56
  Dir.chdir(tmpdir) do
57
57
  command_parts = ["zip --recurse-paths '#{PackageCommandGenerator.ipa_path}' SwiftSupport"]
58
- command_parts << "> /dev/null" unless $verbose
58
+ command_parts << "> /dev/null" unless FastlaneCore::Globals.verbose?
59
59
 
60
60
  FastlaneCore::CommandExecutor.execute(command: command_parts,
61
61
  print_all: false,
@@ -21,7 +21,7 @@ module Match
21
21
  program :help, 'GitHub', 'https://github.com/fastlane/match'
22
22
  program :help_formatter, :compact
23
23
 
24
- global_option('--verbose') { $verbose = true }
24
+ global_option('--verbose') { FastlaneCore::Globals.verbose = true }
25
25
 
26
26
  FastlaneCore::CommanderGenerator.new.generate(Match::Options.available_options)
27
27
 
@@ -43,7 +43,7 @@ module Match
43
43
  crypt(path: current,
44
44
  password: password(git_url),
45
45
  encrypt: true)
46
- UI.success "🔒 Encrypted '#{File.basename(current)}'" if $verbose
46
+ UI.success "🔒 Encrypted '#{File.basename(current)}'" if FastlaneCore::Globals.verbose?
47
47
  end
48
48
  UI.success "🔒 Successfully encrypted certificates repo"
49
49
  end
@@ -61,7 +61,7 @@ module Match
61
61
  decrypt_repo(path: path, git_url: git_url)
62
62
  return
63
63
  end
64
- UI.success "🔓 Decrypted '#{File.basename(current)}'" if $verbose
64
+ UI.success "🔓 Decrypted '#{File.basename(current)}'" if FastlaneCore::Globals.verbose?
65
65
  end
66
66
  UI.success "🔓 Successfully decrypted certificates repo"
67
67
  end
@@ -87,7 +87,7 @@ module Match
87
87
  command << "-out #{tmpfile.shellescape}"
88
88
  command << "-a"
89
89
  command << "-d" unless encrypt
90
- command << "&> /dev/null" unless $verbose # to show show an error message is something goes wrong
90
+ command << "&> /dev/null" unless FastlaneCore::Globals.verbose? # to show show an error message is something goes wrong
91
91
  success = system(command.join(' '))
92
92
 
93
93
  UI.crash!("Error decrypting '#{path}'") unless success
@@ -12,8 +12,8 @@ module Match
12
12
  begin
13
13
  # GIT_TERMINAL_PROMPT will fail the `git clone` command if user credentials are missing
14
14
  FastlaneCore::CommandExecutor.execute(command: "GIT_TERMINAL_PROMPT=0 #{command}",
15
- print_all: $verbose,
16
- print_command: $verbose)
15
+ print_all: FastlaneCore::Globals.verbose?,
16
+ print_command: FastlaneCore::Globals.verbose?)
17
17
  rescue
18
18
  UI.error("Error cloning certificates repo, please make sure you have read access to the repository you want to use")
19
19
  UI.error("Run the following command manually to make sure you're properly authenticated:")
@@ -75,8 +75,8 @@ module Match
75
75
 
76
76
  commands.each do |command|
77
77
  FastlaneCore::CommandExecutor.execute(command: command,
78
- print_all: $verbose,
79
- print_command: $verbose)
78
+ print_all: FastlaneCore::Globals.verbose?,
79
+ print_command: FastlaneCore::Globals.verbose?)
80
80
  end
81
81
  end
82
82
  FileUtils.rm_rf(path)
@@ -114,8 +114,8 @@ module Match
114
114
  Dir.chdir(@dir) do
115
115
  commands.each do |command|
116
116
  FastlaneCore::CommandExecutor.execute(command: command,
117
- print_all: $verbose,
118
- print_command: $verbose)
117
+ print_all: FastlaneCore::Globals.verbose?,
118
+ print_command: FastlaneCore::Globals.verbose?)
119
119
  end
120
120
  end
121
121
  end
@@ -126,8 +126,8 @@ module Match
126
126
 
127
127
  result = Dir.chdir(@dir) do
128
128
  FastlaneCore::CommandExecutor.execute(command: "git branch --list origin/#{branch.shellescape} --no-color -r",
129
- print_all: $verbose,
130
- print_command: $verbose)
129
+ print_all: FastlaneCore::Globals.verbose?,
130
+ print_command: FastlaneCore::Globals.verbose?)
131
131
  end
132
132
  return !result.empty?
133
133
  end
@@ -79,7 +79,7 @@ module Match
79
79
  is_string: false,
80
80
  default_value: false,
81
81
  verify_block: proc do |value|
82
- $verbose = true if value
82
+ FastlaneCore::Globals.verbose = true if value
83
83
  end),
84
84
  FastlaneCore::ConfigItem.new(key: :force,
85
85
  env_name: "MATCH_FORCE",
@@ -2,12 +2,12 @@ module Match
2
2
  class Utils
3
3
  def self.import(item_path, keychain, password: "")
4
4
  keychain_path = FastlaneCore::Helper.keychain_path(keychain)
5
- FastlaneCore::KeychainImporter.import_file(item_path, keychain_path, keychain_password: password, output: $verbose)
5
+ FastlaneCore::KeychainImporter.import_file(item_path, keychain_path, keychain_password: password, output: FastlaneCore::Globals.verbose?)
6
6
  end
7
7
 
8
8
  # Fill in an environment variable, ready to be used in _xcodebuild_
9
9
  def self.fill_environment(key, value)
10
- UI.important "Setting environment variable '#{key}' to '#{value}'" if $verbose
10
+ UI.important "Setting environment variable '#{key}' to '#{value}'" if FastlaneCore::Globals.verbose?
11
11
  ENV[key] = value
12
12
  end
13
13
 
@@ -26,7 +26,7 @@ module Match
26
26
  def self.get_cert_info(cer_certificate_path)
27
27
  command = "openssl x509 -inform der -in #{cer_certificate_path.shellescape} -subject -dates -noout"
28
28
  command << " &" # start in separate process
29
- output = Helper.backticks(command, print: $verbose)
29
+ output = Helper.backticks(command, print: FastlaneCore::Globals.verbose?)
30
30
 
31
31
  # openssl output:
32
32
  # subject= /UID={User ID}/CN={Certificate Name}/OU={Certificate User}/O={Organisation}/C={Country}\n
@@ -20,7 +20,7 @@ module PEM
20
20
  program :help, 'GitHub', 'https://github.com/fastlane/PEM'
21
21
  program :help_formatter, :compact
22
22
 
23
- global_option('--verbose') { $verbose = true }
23
+ global_option('--verbose') { FastlaneCore::Globals.verbose = true }
24
24
 
25
25
  FastlaneCore::CommanderGenerator.new.generate(PEM::Options.available_options)
26
26
 
@@ -48,7 +48,7 @@ module Pilot
48
48
  program :help, "GitHub", "https://github.com/fastlane/fastlane/tree/master/pilot"
49
49
  program :help_formatter, :compact
50
50
 
51
- global_option("--verbose") { $verbose = true }
51
+ global_option("--verbose") { FastlaneCore::Globals.verbose = true }
52
52
 
53
53
  command :upload do |c|
54
54
  c.syntax = "fastlane pilot upload"
data/produce/README.md CHANGED
@@ -79,7 +79,7 @@ To get a list of all available parameters:
79
79
 
80
80
  ```
81
81
  Commands:
82
- associate_group Associate with a group, which is create if needed or simply located otherwise
82
+ associate_group Associate with a group, which is created if needed or simply located otherwise
83
83
  create Creates a new app on iTunes Connect and the Apple Developer Portal
84
84
  disable_services Disable specific Application Services for a specific app on the Apple Developer Portal
85
85
  enable_services Enable specific Application Services for a specific app on the Apple Developer Portal
@@ -20,7 +20,7 @@ module Produce
20
20
  program :help, 'GitHub', 'https://github.com/fastlane/produce'
21
21
  program :help_formatter, :compact
22
22
 
23
- global_option('--verbose') { $verbose = true }
23
+ global_option('--verbose') { FastlaneCore::Globals.verbose = true }
24
24
 
25
25
  FastlaneCore::CommanderGenerator.new.generate(Produce::Options.available_options)
26
26
 
@@ -116,7 +116,7 @@ module Produce
116
116
 
117
117
  command :associate_group do |c|
118
118
  c.syntax = 'fastlane produce associate_group -a APP_IDENTIFIER GROUP_IDENTIFIER1, GROUP_IDENTIFIER2, ...'
119
- c.description = 'Associate with a group, which is create if needed or simply located otherwise'
119
+ c.description = 'Associate with a group, which is created if needed or simply located otherwise'
120
120
  c.example 'Associate with group', 'produce associate-group -a com.example.app group.example.com'
121
121
 
122
122
  c.action do |args, options|
@@ -28,7 +28,7 @@ module Scan
28
28
  program :help, "GitHub", "https://github.com/fastlane/fastlane/tree/master/scan"
29
29
  program :help_formatter, :compact
30
30
 
31
- global_option("--verbose") { $verbose = true }
31
+ global_option("--verbose") { FastlaneCore::Globals.verbose = true }
32
32
 
33
33
  command :tests do |c|
34
34
  c.syntax = "fastlane scan"
@@ -44,6 +44,12 @@ module Scan
44
44
  conflict_block: proc do |value|
45
45
  UI.user_error!("You can't use 'device' and 'devices' options in one run")
46
46
  end),
47
+ FastlaneCore::ConfigItem.new(key: :toolchain,
48
+ env_name: "SCAN_TOOLCHAIN",
49
+ conflicting_options: [:xctestrun],
50
+ description: "The toolchain that should be used for building the application (e.g. com.apple.dt.toolchain.Swift_2_3, org.swift.30p620160816a)",
51
+ optional: true,
52
+ is_string: false),
47
53
  FastlaneCore::ConfigItem.new(key: :devices,
48
54
  optional: true,
49
55
  is_string: false,
@@ -97,8 +97,8 @@ module Scan
97
97
 
98
98
  UI.header("Collecting system logs")
99
99
  Scan.devices.each do |device|
100
- logarchive_dest = File.join(Scan.config[:output_directory], "system_logs-#{device.name}_#{device.os_type}_#{device.os_version}.logarchive")
101
- FastlaneCore::Simulator.copy_logarchive(device, logarchive_dest)
100
+ log_identity = "#{device.name}_#{device.os_type}_#{device.os_version}"
101
+ FastlaneCore::Simulator.copy_logs(device, log_identity, Scan.config[:output_directory])
102
102
  end
103
103
  end
104
104
 
@@ -33,6 +33,7 @@ module Scan
33
33
  options += project_path_array unless config[:xctestrun]
34
34
  options << "-sdk '#{config[:sdk]}'" if config[:sdk]
35
35
  options << destination # generated in `detect_values`
36
+ options << "-toolchain '#{config[:toolchain]}'" if config[:toolchain]
36
37
  options << "-derivedDataPath '#{config[:derived_data_path]}'" if config[:derived_data_path]
37
38
  options << "-resultBundlePath '#{result_bundle_path}'" if config[:result_bundle]
38
39
  options << "-enableCodeCoverage #{config[:code_coverage] ? 'YES' : 'NO'}" unless config[:code_coverage].nil?
@@ -20,7 +20,7 @@ module Screengrab
20
20
  program :help, 'GitHub', 'https://github.com/fastlane/screengrab'
21
21
  program :help_formatter, :compact
22
22
 
23
- global_option('--verbose', 'Shows a more verbose output') { $verbose = true }
23
+ global_option('--verbose', 'Shows a more verbose output') { FastlaneCore::Globals.verbose = true }
24
24
 
25
25
  always_trace!
26
26
 
@@ -20,14 +20,14 @@ module Sigh
20
20
  program :help, 'GitHub', 'https://github.com/fastlane/sigh'
21
21
  program :help_formatter, :compact
22
22
 
23
- global_option('--verbose') { $verbose = true }
24
-
25
- FastlaneCore::CommanderGenerator.new.generate(Sigh::Options.available_options)
23
+ global_option('--verbose') { FastlaneCore::Globals.verbose = true }
26
24
 
27
25
  command :renew do |c|
28
26
  c.syntax = 'fastlane sigh renew'
29
27
  c.description = 'Renews the certificate (in case it expired) and outputs the path to the generated file'
30
28
 
29
+ FastlaneCore::CommanderGenerator.new.generate(Sigh::Options.available_options, command: c)
30
+
31
31
  c.action do |args, options|
32
32
  user_input = options.__hash__
33
33
 
@@ -86,7 +86,7 @@ module Sigh
86
86
  end
87
87
 
88
88
  def self.profile_info(profile)
89
- if $verbose
89
+ if FastlaneCore::Globals.verbose?
90
90
  "#{profile['Name']} - #{File.basename profile['Path']}"
91
91
  else
92
92
  profile['Name']
@@ -33,7 +33,7 @@ module Sigh
33
33
  display_name = "-d #{display_name.shellescape}" if display_name
34
34
  short_version = "--short-version #{short_version}" if short_version
35
35
  bundle_version = "--bundle-version #{bundle_version}" if bundle_version
36
- verbose = "-v" if $verbose
36
+ verbose = "-v" if FastlaneCore::Globals.verbose?
37
37
  bundle_id = "-b '#{new_bundle_id}'" if new_bundle_id
38
38
  use_app_entitlements_flag = "--use-app-entitlements" if use_app_entitlements
39
39
  specific_keychain = "--keychain-path #{keychain_path.shellescape}" if keychain_path
@@ -127,7 +127,7 @@ module Sigh
127
127
  end
128
128
  end
129
129
 
130
- UI.important "Creating new provisioning profile for '#{Sigh.config[:app_identifier]}' with name '#{name} for #{Sigh.config[:platform]} platform'"
130
+ UI.important "Creating new provisioning profile for '#{Sigh.config[:app_identifier]}' with name '#{name}' for '#{Sigh.config[:platform]}' platform"
131
131
  profile = profile_type.create!(name: name,
132
132
  bundle_id: bundle_id,
133
133
  certificate: cert,
@@ -216,8 +216,13 @@ module Sigh
216
216
  # Downloads and stores the provisioning profile
217
217
  def download_profile(profile)
218
218
  UI.important "Downloading provisioning profile..."
219
- profile_name ||= "#{profile_type.pretty_type}_#{Sigh.config[:app_identifier]}.mobileprovision" # default name
220
- profile_name += '.mobileprovision' unless profile_name.include? 'mobileprovision'
219
+ profile_name ||= "#{profile_type.pretty_type}_#{Sigh.config[:app_identifier]}"
220
+
221
+ if Sigh.config[:platform].to_s == 'tvos'
222
+ profile_name += "_tvos"
223
+ end
224
+
225
+ profile_name += '.mobileprovision'
221
226
 
222
227
  tmp_path = Dir.mktmpdir("profile_download")
223
228
  output_path = File.join(tmp_path, profile_name)
data/snapshot/README.md CHANGED
@@ -280,7 +280,7 @@ to update your `SnapshotHelper.swift` files. In case you modified your `Snapshot
280
280
 
281
281
  ## Launch Arguments
282
282
 
283
- You can provide additional arguments to your app on launch. These strings will be available in your app (eg. not in the testing target) through `NSProcessInfo.processInfo().arguments`. Alternatively, use user-default syntax (`-key value`) and they will be available as key-value pairs in `NSUserDefaults.standardUserDefaults()`.
283
+ You can provide additional arguments to your app on launch. These strings will be available in your app (eg. not in the testing target) through `ProcessInfo.processInfo.arguments`. Alternatively, use user-default syntax (`-key value`) and they will be available as key-value pairs in `UserDefaults.standard`.
284
284
 
285
285
  ```ruby
286
286
  launch_arguments([
@@ -289,14 +289,14 @@ launch_arguments([
289
289
  ```
290
290
 
291
291
  ```swift
292
- name.text = NSUserDefaults.standardUserDefaults().stringForKey("firstName")
292
+ name.text = UserDefaults.standard.string(forKey: "firstName")
293
293
  // name.text = "Felix"
294
294
  ```
295
295
 
296
296
  _snapshot_ includes `-FASTLANE_SNAPSHOT YES`, which will set a temporary user default for the key `FASTLANE_SNAPSHOT`, you may use this to detect when the app is run by _snapshot_.
297
297
 
298
298
  ```swift
299
- if NSUserDefaults.standardUserDefaults().boolForKey("FASTLANE_SNAPSHOT") {
299
+ if UserDefaults.standard.bool(forKey: "FASTLANE_SNAPSHOT") {
300
300
  // runtime check that we are in snapshot mode
301
301
  }
302
302
  ```
@@ -30,7 +30,7 @@ module Snapshot
30
30
  screenshot_name = device_name + "-" + name + "-" + Digest::MD5.hexdigest(components.join("-")) + ".png"
31
31
  output_path = File.join(language_folder, screenshot_name)
32
32
  from_path = File.join(attachments_path, filename)
33
- if $verbose
33
+ if FastlaneCore::Globals.verbose?
34
34
  UI.success "Copying file '#{from_path}' to '#{output_path}'..."
35
35
  else
36
36
  UI.success "Copying '#{output_path}'..."
@@ -20,7 +20,7 @@ module Snapshot
20
20
  program :help, 'GitHub', 'https://github.com/fastlane/snapshot'
21
21
  program :help_formatter, :compact
22
22
 
23
- global_option('--verbose', 'Shows a more verbose output') { $verbose = true }
23
+ global_option('--verbose', 'Shows a more verbose output') { FastlaneCore::Globals.verbose = true }
24
24
 
25
25
  always_trace!
26
26
 
@@ -7,7 +7,7 @@ module Snapshot
7
7
  def self.patch
8
8
  UI.verbose "Patching simulator to work with secure text fields"
9
9
 
10
- Helper.backticks("defaults write com.apple.iphonesimulator ConnectHardwareKeyboard 0", print: $verbose)
10
+ Helper.backticks("defaults write com.apple.iphonesimulator ConnectHardwareKeyboard 0", print: FastlaneCore::Globals.verbose?)
11
11
  end
12
12
  end
13
13
  end
@@ -13,7 +13,7 @@ module Snapshot
13
13
  simulator_name = simulator.name.tr("\s", "-")
14
14
  key = "SimulatorWindowLastScale-com.apple.CoreSimulator.SimDeviceType.#{simulator_name}"
15
15
 
16
- Helper.backticks("defaults write '#{config_path}' '#{key}' '1.0'", print: $verbose)
16
+ Helper.backticks("defaults write '#{config_path}' '#{key}' '1.0'", print: FastlaneCore::Globals.verbose?)
17
17
  end
18
18
  end
19
19
 
@@ -58,7 +58,7 @@ module Snapshot
58
58
  end
59
59
 
60
60
  def self.devices
61
- all_devices = Helper.backticks('xcrun simctl list devices', print: $verbose)
61
+ all_devices = Helper.backticks('xcrun simctl list devices', print: FastlaneCore::Globals.verbose?)
62
62
  # == Devices ==
63
63
  # -- iOS 9.0 --
64
64
  # iPhone 4s (32246EBC-33B0-47F9-B7BB-5C23C550DF29) (Shutdown)
@@ -85,7 +85,7 @@ module Snapshot
85
85
 
86
86
  if phones.any? && watches.any?
87
87
  puts "Creating device pair of #{phones.last} and #{watches.last}"
88
- Helper.backticks("xcrun simctl pair #{watches.last} #{phones.last}", print: $verbose)
88
+ Helper.backticks("xcrun simctl pair #{watches.last} #{phones.last}", print: FastlaneCore::Globals.verbose?)
89
89
  end
90
90
  end
91
91
 
@@ -81,7 +81,7 @@ module Snapshot
81
81
  UI.important "Tests failed, re-trying #{retries + 1} out of #{Snapshot.config[:number_of_retries] + 1} times"
82
82
  run_for_device_and_language(language, locale, device, launch_arguments, retries + 1)
83
83
  else
84
- UI.error "Backtrace:\n\t#{ex.backtrace.join("\n\t")}" if $verbose
84
+ UI.error "Backtrace:\n\t#{ex.backtrace.join("\n\t")}" if FastlaneCore::Globals.verbose?
85
85
  self.collected_errors << ex
86
86
  raise ex if Snapshot.config[:stop_after_first_error]
87
87
  return false # for the results
@@ -107,8 +107,8 @@ module Snapshot
107
107
  components = [launch_arguments].delete_if { |a| a.to_s.length == 0 }
108
108
 
109
109
  UI.header("Collecting system logs #{device_name} - #{language}")
110
- logarchive_dest = File.join(language_folder, "system_logs-" + Digest::MD5.hexdigest(components.join("-")) + ".logarchive")
111
- FastlaneCore::Simulator.copy_logarchive(device, logarchive_dest)
110
+ log_identity = Digest::MD5.hexdigest(components.join("-"))
111
+ FastlaneCore::Simulator.copy_logs(device, log_identity, language_folder)
112
112
  end
113
113
 
114
114
  def print_results(results)
@@ -1,3 +1,4 @@
1
+ require 'spaceship/globals'
1
2
  require 'spaceship/base'
2
3
  require 'spaceship/client'
3
4
  require 'spaceship/launcher'
@@ -20,6 +21,7 @@ module Spaceship
20
21
  Device = Spaceship::Portal::Device
21
22
  App = Spaceship::Portal::App
22
23
  AppGroup = Spaceship::Portal::AppGroup
24
+ WebsitePush = Spaceship::Portal::WebsitePush
23
25
  AppService = Spaceship::Portal::AppService
24
26
 
25
27
  # iTunes Connect