fastlane 2.129.0 → 2.134.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +66 -66
  3. data/cert/lib/cert/module.rb +2 -0
  4. data/cert/lib/cert/options.rb +6 -0
  5. data/cert/lib/cert/runner.rb +17 -11
  6. data/fastlane/lib/fastlane.rb +4 -1
  7. data/fastlane/lib/fastlane/actions/.download_dsyms.rb.swp +0 -0
  8. data/fastlane/lib/fastlane/actions/.hockey.rb.swp +0 -0
  9. data/fastlane/lib/fastlane/actions/actions_helper.rb +4 -0
  10. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +11 -3
  11. data/fastlane/lib/fastlane/actions/carthage.rb +11 -3
  12. data/fastlane/lib/fastlane/actions/cocoapods.rb +24 -2
  13. data/fastlane/lib/fastlane/actions/copy_artifacts.rb +1 -1
  14. data/fastlane/lib/fastlane/actions/danger.rb +7 -0
  15. data/fastlane/lib/fastlane/actions/deploygate.rb +1 -1
  16. data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +23 -4
  17. data/fastlane/lib/fastlane/actions/download_dsyms.rb +59 -10
  18. data/fastlane/lib/fastlane/actions/ensure_env_vars.rb +58 -0
  19. data/fastlane/lib/fastlane/actions/get_version_number.rb +12 -3
  20. data/fastlane/lib/fastlane/actions/gradle.rb +11 -1
  21. data/fastlane/lib/fastlane/actions/onesignal.rb +59 -29
  22. data/fastlane/lib/fastlane/actions/pod_push.rb +10 -1
  23. data/fastlane/lib/fastlane/actions/register_devices.rb +38 -22
  24. data/fastlane/lib/fastlane/actions/resign.rb +2 -2
  25. data/fastlane/lib/fastlane/actions/slather.rb +1 -0
  26. data/fastlane/lib/fastlane/actions/sonar.rb +16 -0
  27. data/fastlane/lib/fastlane/actions/testfairy.rb +1 -1
  28. data/fastlane/lib/fastlane/actions/update_fastlane.rb +9 -49
  29. data/fastlane/lib/fastlane/actions/update_keychain_access_groups.rb +94 -0
  30. data/fastlane/lib/fastlane/commands_generator.rb +16 -0
  31. data/fastlane/lib/fastlane/environment_printer.rb +7 -1
  32. data/fastlane/lib/fastlane/fast_file.rb +10 -4
  33. data/fastlane/lib/fastlane/helper/crashlytics_helper.rb +1 -1
  34. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +2 -0
  35. data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +3 -0
  36. data/fastlane/lib/fastlane/setup/setup_android.rb +1 -1
  37. data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +122 -34
  38. data/fastlane/lib/fastlane/swift_fastlane_function.rb +72 -3
  39. data/fastlane/lib/fastlane/swift_runner_upgrader.rb +4 -0
  40. data/fastlane/lib/fastlane/version.rb +1 -1
  41. data/fastlane/swift/Actions.swift +15 -0
  42. data/fastlane/swift/Deliverfile.swift +1 -1
  43. data/fastlane/swift/DeliverfileProtocol.swift +121 -1
  44. data/fastlane/swift/Fastlane.swift +3925 -30
  45. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +9 -0
  46. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  47. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  48. data/fastlane/swift/Gymfile.swift +1 -1
  49. data/fastlane/swift/GymfileProtocol.swift +91 -9
  50. data/fastlane/swift/Matchfile.swift +1 -1
  51. data/fastlane/swift/MatchfileProtocol.swift +65 -1
  52. data/fastlane/swift/Plugins.swift +15 -0
  53. data/fastlane/swift/Precheckfile.swift +1 -1
  54. data/fastlane/swift/PrecheckfileProtocol.swift +15 -2
  55. data/fastlane/swift/Scanfile.swift +1 -1
  56. data/fastlane/swift/ScanfileProtocol.swift +109 -1
  57. data/fastlane/swift/Screengrabfile.swift +1 -1
  58. data/fastlane/swift/ScreengrabfileProtocol.swift +39 -2
  59. data/fastlane/swift/Snapshotfile.swift +1 -1
  60. data/fastlane/swift/SnapshotfileProtocol.swift +71 -1
  61. data/fastlane/swift/upgrade_manifest.json +1 -1
  62. data/fastlane_core/lib/fastlane_core/command_executor.rb +1 -1
  63. data/fastlane_core/lib/fastlane_core/device_manager.rb +1 -1
  64. data/fastlane_core/lib/fastlane_core/helper.rb +1 -1
  65. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +1 -3
  66. data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +3 -2
  67. data/frameit/lib/frameit/screenshot.rb +4 -0
  68. data/gym/lib/gym/generators/build_command_generator.rb +5 -1
  69. data/gym/lib/gym/options.rb +16 -16
  70. data/gym/lib/gym/runner.rb +33 -5
  71. data/match/lib/match/generator.rb +1 -0
  72. data/match/lib/match/importer.rb +2 -2
  73. data/match/lib/match/module.rb +2 -0
  74. data/match/lib/match/nuke.rb +5 -5
  75. data/match/lib/match/options.rb +17 -0
  76. data/match/lib/match/runner.rb +10 -6
  77. data/match/lib/match/storage/git_storage.rb +8 -2
  78. data/match/lib/match/storage/google_cloud_storage.rb +85 -33
  79. data/produce/lib/produce/service.rb +7 -1
  80. data/scan/lib/scan/error_handler.rb +9 -4
  81. data/scan/lib/scan/runner.rb +1 -1
  82. data/sigh/lib/sigh/download_all.rb +48 -8
  83. data/sigh/lib/sigh/runner.rb +13 -5
  84. data/snapshot/lib/snapshot/commands_generator.rb +2 -2
  85. data/snapshot/lib/snapshot/options.rb +5 -0
  86. data/snapshot/lib/snapshot/reports_generator.rb +3 -0
  87. data/snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb +2 -0
  88. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb +1 -1
  89. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +16 -1
  90. data/snapshot/lib/snapshot/update.rb +4 -2
  91. data/spaceship/lib/spaceship/client.rb +3 -3
  92. data/spaceship/lib/spaceship/connect_api/models/app.rb +6 -6
  93. data/spaceship/lib/spaceship/connect_api/models/build.rb +3 -3
  94. data/spaceship/lib/spaceship/connect_api/models/build_delivery.rb +1 -1
  95. data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +1 -1
  96. data/spaceship/lib/spaceship/connect_api/models/certificate.rb +1 -1
  97. data/spaceship/lib/spaceship/connect_api/models/device.rb +1 -1
  98. data/spaceship/lib/spaceship/connect_api/models/profile.rb +1 -1
  99. data/spaceship/lib/spaceship/portal/.certificate.rb.swp +0 -0
  100. data/spaceship/lib/spaceship/portal/provisioning_profile.rb +1 -1
  101. data/spaceship/lib/spaceship/tunes/app_version.rb +4 -0
  102. data/spaceship/lib/spaceship/tunes/application.rb +4 -0
  103. data/spaceship/lib/spaceship/tunes/availability.rb +40 -8
  104. data/spaceship/lib/spaceship/tunes/b2b_organization.rb +50 -0
  105. data/spaceship/lib/spaceship/tunes/iap_family_details.rb +10 -2
  106. data/spaceship/lib/spaceship/tunes/tunes_client.rb +26 -1
  107. metadata +55 -46
@@ -18,4 +18,4 @@ class Screengrabfile: ScreengrabfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.129.0
21
+ // Generated with fastlane 2.134.0
@@ -1,22 +1,60 @@
1
1
  protocol ScreengrabfileProtocol: class {
2
+
3
+ /// Path to the root of your Android SDK installation, e.g. ~/tools/android-sdk-macosx
2
4
  var androidHome: String? { get }
5
+
6
+ /// The Android build tools version to use, e.g. '23.0.2'
3
7
  var buildToolsVersion: String? { get }
8
+
9
+ /// A list of locales which should be used
4
10
  var locales: [String] { get }
11
+
12
+ /// Enabling this option will automatically clear previously generated screenshots before running screengrab
5
13
  var clearPreviousScreenshots: Bool { get }
14
+
15
+ /// The directory where to store the screenshots
6
16
  var outputDirectory: String { get }
17
+
18
+ /// Don't open the summary after running _screengrab_
7
19
  var skipOpenSummary: Bool { get }
20
+
21
+ /// The package name of the app under test (e.g. com.yourcompany.yourapp)
8
22
  var appPackageName: String { get }
23
+
24
+ /// The package name of the tests bundle (e.g. com.yourcompany.yourapp.test)
9
25
  var testsPackageName: String? { get }
26
+
27
+ /// Only run tests in these Java packages
10
28
  var useTestsInPackages: [String]? { get }
29
+
30
+ /// Only run tests in these Java classes
11
31
  var useTestsInClasses: [String]? { get }
32
+
33
+ /// Additional launch arguments
12
34
  var launchArguments: [String]? { get }
35
+
36
+ /// The fully qualified class name of your test instrumentation runner
13
37
  var testInstrumentationRunner: String { get }
38
+
39
+ /// Return the device to this locale after running tests
14
40
  var endingLocale: String { get }
41
+
42
+ /// The path to the APK for the app under test
15
43
  var appApkPath: String? { get }
44
+
45
+ /// The path to the APK for the the tests bundle
16
46
  var testsApkPath: String? { get }
47
+
48
+ /// Use the device or emulator with the given serial number or qualifier
17
49
  var specificDevice: String? { get }
50
+
51
+ /// Type of device used for screenshots. Matches Google Play Types (phone, sevenInch, tenInch, tv, wear)
18
52
  var deviceType: String { get }
53
+
54
+ /// Whether or not to exit Screengrab on test failure. Exiting on failure will not copy sceenshots to local machine nor open sceenshots summary
19
55
  var exitOnTestFailure: Bool { get }
56
+
57
+ /// Enabling this option will automatically uninstall the application before running it
20
58
  var reinstallApp: Bool { get }
21
59
  }
22
60
 
@@ -42,7 +80,6 @@ extension ScreengrabfileProtocol {
42
80
  var reinstallApp: Bool { return false }
43
81
  }
44
82
 
45
-
46
83
  // Please don't remove the lines below
47
84
  // They are used to detect outdated files
48
- // FastlaneRunnerAPIVersion [0.9.1]
85
+ // FastlaneRunnerAPIVersion [0.9.11]
@@ -18,4 +18,4 @@ class Snapshotfile: SnapshotfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.129.0
21
+ // Generated with fastlane 2.134.0
@@ -1,36 +1,105 @@
1
1
  protocol SnapshotfileProtocol: class {
2
+
3
+ /// Path the workspace file
2
4
  var workspace: String? { get }
5
+
6
+ /// Path the project file
3
7
  var project: String? { get }
8
+
9
+ /// Pass additional arguments to xcodebuild for the test phase. Be sure to quote the setting names and values e.g. OTHER_LDFLAGS="-ObjC -lstdc++"
4
10
  var xcargs: String? { get }
11
+
12
+ /// Use an extra XCCONFIG file to build your app
5
13
  var xcconfig: String? { get }
14
+
15
+ /// A list of devices you want to take the screenshots from
6
16
  var devices: [String]? { get }
17
+
18
+ /// A list of languages which should be used
7
19
  var languages: [String] { get }
20
+
21
+ /// A list of launch arguments which should be used
8
22
  var launchArguments: [String] { get }
23
+
24
+ /// The directory where to store the screenshots
9
25
  var outputDirectory: String { get }
26
+
27
+ /// If the logs generated by the app (e.g. using NSLog, perror, etc.) in the Simulator should be written to the output_directory
10
28
  var outputSimulatorLogs: Bool { get }
29
+
30
+ /// By default, the latest version should be used automatically. If you want to change it, do it here
11
31
  var iosVersion: String? { get }
32
+
33
+ /// Don't open the HTML summary after running _snapshot_
12
34
  var skipOpenSummary: Bool { get }
35
+
36
+ /// Do not check for most recent SnapshotHelper code
13
37
  var skipHelperVersionCheck: Bool { get }
38
+
39
+ /// Enabling this option will automatically clear previously generated screenshots before running snapshot
14
40
  var clearPreviousScreenshots: Bool { get }
41
+
42
+ /// Enabling this option will automatically uninstall the application before running it
15
43
  var reinstallApp: Bool { get }
44
+
45
+ /// Enabling this option will automatically erase the simulator before running the application
16
46
  var eraseSimulator: Bool { get }
47
+
48
+ /// Enabling this option will configure the Simulator's system language
17
49
  var localizeSimulator: Bool { get }
50
+
51
+ /// Enabling this option will configure the Simulator to be in dark mode (false for light, true for dark)
52
+ var darkMode: Bool? { get }
53
+
54
+ /// The bundle identifier of the app to uninstall (only needed when enabling reinstall_app)
18
55
  var appIdentifier: String? { get }
56
+
57
+ /// A list of photos that should be added to the simulator before running the application
19
58
  var addPhotos: [String]? { get }
59
+
60
+ /// A list of videos that should be added to the simulator before running the application
20
61
  var addVideos: [String]? { get }
62
+
63
+ /// The directory where to store the build log
21
64
  var buildlogPath: String { get }
65
+
66
+ /// Should the project be cleaned before building it?
22
67
  var clean: Bool { get }
68
+
69
+ /// Test without building, requires a derived data path
23
70
  var testWithoutBuilding: Bool? { get }
71
+
72
+ /// The configuration to use when building the app. Defaults to 'Release'
24
73
  var configuration: String? { get }
74
+
75
+ /// Additional xcpretty arguments
25
76
  var xcprettyArgs: String? { get }
77
+
78
+ /// The SDK that should be used for building the application
26
79
  var sdk: String? { get }
80
+
81
+ /// The scheme you want to use, this must be the scheme for the UI Tests
27
82
  var scheme: String? { get }
83
+
84
+ /// The number of times a test can fail before snapshot should stop retrying
28
85
  var numberOfRetries: Int { get }
86
+
87
+ /// Should snapshot stop immediately after the tests completely failed on one device?
29
88
  var stopAfterFirstError: Bool { get }
89
+
90
+ /// The directory where build products and other derived data will go
30
91
  var derivedDataPath: String? { get }
92
+
93
+ /// Should an Xcode result bundle be generated in the output directory
31
94
  var resultBundle: Bool { get }
95
+
96
+ /// The name of the target you want to test (if you desire to override the Target Application from Xcode)
32
97
  var testTargetName: String? { get }
98
+
99
+ /// Separate the log files per device and per language
33
100
  var namespaceLogFiles: String? { get }
101
+
102
+ /// Take snapshots on multiple simulators concurrently. Note: This option is only applicable when running against Xcode 9
34
103
  var concurrentSimulators: Bool { get }
35
104
  }
36
105
 
@@ -51,6 +120,7 @@ extension SnapshotfileProtocol {
51
120
  var reinstallApp: Bool { return false }
52
121
  var eraseSimulator: Bool { return false }
53
122
  var localizeSimulator: Bool { return false }
123
+ var darkMode: Bool? { return nil }
54
124
  var appIdentifier: String? { return nil }
55
125
  var addPhotos: [String]? { return nil }
56
126
  var addVideos: [String]? { return nil }
@@ -72,4 +142,4 @@ extension SnapshotfileProtocol {
72
142
 
73
143
  // Please don't remove the lines below
74
144
  // They are used to detect outdated files
75
- // FastlaneRunnerAPIVersion [0.9.4]
145
+ // FastlaneRunnerAPIVersion [0.9.6]
@@ -1 +1 @@
1
- {"Fastlane.swift":"Autogenerated API","DeliverfileProtocol.swift":"Autogenerated API","GymfileProtocol.swift":"Autogenerated API","MatchfileProtocol.swift":"Autogenerated API","PrecheckfileProtocol.swift":"Autogenerated API","ScanfileProtocol.swift":"Autogenerated API","ScreengrabfileProtocol.swift":"Autogenerated API","SnapshotfileProtocol.swift":"Autogenerated API","LaneFileProtocol.swift":"Fastfile Components","ControlCommand.swift":"Networking","RubyCommand.swift":"Networking","RubyCommandable.swift":"Networking","Runner.swift":"Networking","SocketClient.swift":"Networking","SocketClientDelegateProtocol.swift":"Networking","SocketResponse.swift":"Networking","ArgumentProcessor.swift":"Runner Code","main.swift":"Runner Code","RunnerArgument.swift":"Runner Code"}
1
+ {"Actions.swift":"Autogenerated API","Fastlane.swift":"Autogenerated API","DeliverfileProtocol.swift":"Autogenerated API","GymfileProtocol.swift":"Autogenerated API","MatchfileProtocol.swift":"Autogenerated API","Plugins.swift":"Autogenerated API","PrecheckfileProtocol.swift":"Autogenerated API","ScanfileProtocol.swift":"Autogenerated API","ScreengrabfileProtocol.swift":"Autogenerated API","SnapshotfileProtocol.swift":"Autogenerated API","LaneFileProtocol.swift":"Fastfile Components","ControlCommand.swift":"Networking","RubyCommand.swift":"Networking","RubyCommandable.swift":"Networking","Runner.swift":"Networking","SocketClient.swift":"Networking","SocketClientDelegateProtocol.swift":"Networking","SocketResponse.swift":"Networking","ArgumentProcessor.swift":"Runner Code","main.swift":"Runner Code","RunnerArgument.swift":"Runner Code"}
@@ -51,7 +51,7 @@ module FastlaneCore
51
51
  begin
52
52
  status = FastlaneCore::FastlanePty.spawn(command) do |command_stdout, command_stdin, pid|
53
53
  command_stdout.each do |l|
54
- line = l.strip # strip so that \n gets removed
54
+ line = l.chomp
55
55
  output << line
56
56
 
57
57
  next unless print_all
@@ -307,7 +307,7 @@ module FastlaneCore
307
307
  logarchive_dst = File.join(logs_destination_dir, "system_logs-#{log_identity}.logarchive").shellescape
308
308
  FileUtils.rm_rf(logarchive_dst)
309
309
  FileUtils.mkdir_p(File.expand_path("..", logarchive_dst))
310
- command = "xcrun simctl spawn #{device.udid} log collect --output #{logarchive_dst} 2>/dev/null"
310
+ command = "xcrun simctl spawn --standalone #{device.udid} log collect --output #{logarchive_dst} 2>/dev/null"
311
311
  FastlaneCore::CommandExecutor.execute(command: command, print_all: false, print_command: true)
312
312
  end
313
313
  end
@@ -72,7 +72,7 @@ module FastlaneCore
72
72
  # @return [boolean] true if building in a known CI environment
73
73
  def self.ci?
74
74
  # Check for Jenkins, Travis CI, ... environment variables
75
- ['JENKINS_HOME', 'JENKINS_URL', 'TRAVIS', 'CIRCLECI', 'CI', 'APPCENTER_BUILD_ID', 'TEAMCITY_VERSION', 'GO_PIPELINE_NAME', 'bamboo_buildKey', 'GITLAB_CI', 'XCS', 'TF_BUILD'].each do |current|
75
+ ['JENKINS_HOME', 'JENKINS_URL', 'TRAVIS', 'CIRCLECI', 'CI', 'APPCENTER_BUILD_ID', 'TEAMCITY_VERSION', 'GO_PIPELINE_NAME', 'bamboo_buildKey', 'GITLAB_CI', 'XCS', 'TF_BUILD', 'GITHUB_ACTION', 'GITHUB_ACTIONS'].each do |current|
76
76
  return true if ENV.key?(current)
77
77
  end
78
78
  return false
@@ -154,7 +154,7 @@ module FastlaneCore
154
154
  # As there was no communication from Apple, we don't know if this is a temporary
155
155
  # server outage, or something they changed without giving a heads-up
156
156
  if ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"].to_s.length == 0
157
- ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"] = "-t DAV"
157
+ ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"] = "-t DAV,Signiant"
158
158
  end
159
159
  return ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"]
160
160
  end
@@ -170,7 +170,6 @@ module FastlaneCore
170
170
  "-p #{shell_escaped_password(password)}",
171
171
  "-f \"#{source}\"",
172
172
  additional_upload_parameters, # that's here, because the user might overwrite the -t option
173
- "-t Signiant",
174
173
  "-k 100000",
175
174
  ("-WONoPause true" if Helper.windows?), # Windows only: process instantly returns instead of waiting for key press
176
175
  ("-itc_provider #{provider_short_name}" unless provider_short_name.to_s.empty?)
@@ -255,7 +254,6 @@ module FastlaneCore
255
254
  "-p #{password.shellescape}",
256
255
  "-f #{source.shellescape}",
257
256
  additional_upload_parameters, # that's here, because the user might overwrite the -t option
258
- '-t Signiant',
259
257
  '-k 100000',
260
258
  ("-itc_provider #{provider_short_name}" unless provider_short_name.to_s.empty?),
261
259
  '2>&1' # cause stderr to be written to stdout
@@ -30,12 +30,13 @@ module FastlaneCore
30
30
  end
31
31
 
32
32
  def format_string(datetime = Time.now, severity = "")
33
+ timezone_string = !FastlaneCore::Env.truthy?('FASTLANE_SHOW_TIMEZONE') ? '' : ' %z'
33
34
  if FastlaneCore::Globals.verbose?
34
- return "#{severity} [#{datetime.strftime('%Y-%m-%d %H:%M:%S.%2N')}]: "
35
+ return "#{severity} [#{datetime.strftime('%Y-%m-%d %H:%M:%S.%2N' + timezone_string)}]: "
35
36
  elsif FastlaneCore::Env.truthy?("FASTLANE_HIDE_TIMESTAMP")
36
37
  return ""
37
38
  else
38
- return "[#{datetime.strftime('%H:%M:%S')}]: "
39
+ return "[#{datetime.strftime('%H:%M:%S' + timezone_string)}]: "
39
40
  end
40
41
  end
41
42
 
@@ -45,6 +45,10 @@ module Frameit
45
45
  return 'iPhone 4'
46
46
  when sizes::IOS_IPAD
47
47
  return 'iPad Air 2'
48
+ when sizes::IOS_IPAD_10_5
49
+ return 'iPad Pro (10.5-inch)'
50
+ when sizes::IOS_IPAD_11
51
+ return 'iPad Pro (11-inch)'
48
52
  when sizes::IOS_IPAD_PRO
49
53
  return 'iPad Pro'
50
54
  when sizes::IOS_IPAD_PRO_12_9
@@ -58,7 +58,11 @@ module Gym
58
58
 
59
59
  def setting
60
60
  setting = []
61
- setting << "CODE_SIGN_IDENTITY=#{Gym.config[:codesigning_identity].shellescape}" if Gym.config[:codesigning_identity]
61
+ if Gym.config[:skip_codesigning]
62
+ setting << "CODE_SIGN_IDENTITY='' CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS='' CODE_SIGNING_ALLOWED=NO"
63
+ elsif Gym.config[:codesigning_identity]
64
+ setting << "CODE_SIGN_IDENTITY=#{Gym.config[:codesigning_identity].shellescape}"
65
+ end
62
66
  setting
63
67
  end
64
68
 
@@ -51,7 +51,7 @@ module Gym
51
51
  short_option: "-c",
52
52
  env_name: "GYM_CLEAN",
53
53
  description: "Should the project be cleaned before building it?",
54
- is_string: false,
54
+ type: Boolean,
55
55
  default_value: false),
56
56
  FastlaneCore::ConfigItem.new(key: :output_directory,
57
57
  short_option: "-o",
@@ -74,7 +74,7 @@ module Gym
74
74
  env_name: "GYM_SILENT",
75
75
  description: "Hide all information that's not necessary while building",
76
76
  default_value: false,
77
- is_string: false),
77
+ type: Boolean),
78
78
  FastlaneCore::ConfigItem.new(key: :codesigning_identity,
79
79
  short_option: "-i",
80
80
  env_name: "GYM_CODE_SIGNING_IDENTITY",
@@ -83,27 +83,25 @@ module Gym
83
83
  FastlaneCore::ConfigItem.new(key: :skip_package_ipa,
84
84
  env_name: "GYM_SKIP_PACKAGE_IPA",
85
85
  description: "Should we skip packaging the ipa?",
86
- is_string: false,
86
+ type: Boolean,
87
87
  default_value: false),
88
88
  FastlaneCore::ConfigItem.new(key: :include_symbols,
89
89
  short_option: "-m",
90
90
  env_name: "GYM_INCLUDE_SYMBOLS",
91
91
  description: "Should the ipa file include symbols?",
92
- is_string: false,
93
92
  type: Boolean,
94
93
  optional: true),
95
94
  FastlaneCore::ConfigItem.new(key: :include_bitcode,
96
95
  short_option: "-z",
97
96
  env_name: "GYM_INCLUDE_BITCODE",
98
97
  description: "Should the ipa file include bitcode?",
99
- is_string: false,
100
98
  type: Boolean,
101
99
  optional: true),
102
100
  FastlaneCore::ConfigItem.new(key: :export_method,
103
101
  short_option: "-j",
104
102
  env_name: "GYM_EXPORT_METHOD",
105
103
  description: "Method used to export the archive. Valid values are: app-store, ad-hoc, package, enterprise, development, developer-id",
106
- is_string: true,
104
+ type: String,
107
105
  optional: true,
108
106
  verify_block: proc do |value|
109
107
  av = %w(app-store ad-hoc package enterprise development developer-id)
@@ -112,7 +110,6 @@ module Gym
112
110
  FastlaneCore::ConfigItem.new(key: :export_options,
113
111
  env_name: "GYM_EXPORT_OPTIONS",
114
112
  description: "Path to an export options plist or a hash with export options. Use 'xcodebuild -help' to print the full set of available options",
115
- is_string: false,
116
113
  optional: true,
117
114
  type: Hash,
118
115
  skip_type_validation: true,
@@ -130,13 +127,16 @@ module Gym
130
127
  FastlaneCore::ConfigItem.new(key: :skip_build_archive,
131
128
  env_name: "GYM_SKIP_BUILD_ARCHIVE",
132
129
  description: "Export ipa from previously built xcarchive. Uses archive_path as source",
133
- is_string: false,
134
130
  type: Boolean,
135
131
  optional: true),
136
132
  FastlaneCore::ConfigItem.new(key: :skip_archive,
137
133
  env_name: "GYM_SKIP_ARCHIVE",
138
134
  description: "After building, don't archive, effectively not including -archivePath param",
139
- is_string: false,
135
+ type: Boolean,
136
+ optional: true),
137
+ FastlaneCore::ConfigItem.new(key: :skip_codesigning,
138
+ env_name: "GYM_SKIP_CODESIGNING",
139
+ description: "Build without codesigning",
140
140
  type: Boolean,
141
141
  optional: true),
142
142
  # Very optional
@@ -157,7 +157,7 @@ module Gym
157
157
  FastlaneCore::ConfigItem.new(key: :result_bundle,
158
158
  short_option: "-u",
159
159
  env_name: "GYM_RESULT_BUNDLE",
160
- is_string: false,
160
+ type: Boolean,
161
161
  description: "Should an Xcode result bundle be generated in the output directory",
162
162
  default_value: false,
163
163
  optional: true),
@@ -180,7 +180,7 @@ module Gym
180
180
  env_name: "GYM_TOOLCHAIN",
181
181
  description: "The toolchain that should be used for building the application (e.g. com.apple.dt.toolchain.Swift_2_3, org.swift.30p620160816a)",
182
182
  optional: true,
183
- is_string: false),
183
+ type: String),
184
184
  FastlaneCore::ConfigItem.new(key: :destination,
185
185
  short_option: "-d",
186
186
  env_name: "GYM_DESTINATION",
@@ -215,12 +215,12 @@ module Gym
215
215
  env_name: "DISABLE_XCPRETTY",
216
216
  description: "Disable xcpretty formatting of build output",
217
217
  optional: true,
218
- is_string: false),
218
+ type: Boolean),
219
219
  FastlaneCore::ConfigItem.new(key: :xcpretty_test_format,
220
220
  env_name: "XCPRETTY_TEST_FORMAT",
221
221
  description: "Use the test (RSpec style) format for build output",
222
222
  optional: true,
223
- is_string: false),
223
+ type: Boolean),
224
224
  FastlaneCore::ConfigItem.new(key: :xcpretty_formatter,
225
225
  env_name: "XCPRETTY_FORMATTER",
226
226
  description: "A custom xcpretty formatter to use",
@@ -244,17 +244,17 @@ module Gym
244
244
  env_name: "GYM_ANALYZE_BUILD_TIME",
245
245
  description: "Analyze the project build time and store the output in 'culprits.txt' file",
246
246
  optional: true,
247
- is_string: false),
247
+ type: Boolean),
248
248
  FastlaneCore::ConfigItem.new(key: :xcpretty_utf,
249
249
  env_name: "XCPRETTY_UTF",
250
250
  description: "Have xcpretty use unicode encoding when reporting builds",
251
251
  optional: true,
252
- is_string: false),
252
+ type: Boolean),
253
253
  FastlaneCore::ConfigItem.new(key: :skip_profile_detection,
254
254
  env_name: "GYM_SKIP_PROFILE_DETECTION",
255
255
  description: "Do not try to build a profile mapping from the xcodeproj. Match or a manually provided mapping should be used",
256
256
  optional: true,
257
- is_string: false,
257
+ type: Boolean,
258
258
  default_value: false)
259
259
  ]
260
260
  end
@@ -146,15 +146,43 @@ module Gym
146
146
  containing_directory = File.expand_path("..", PackageCommandGenerator.dsym_path)
147
147
  bcsymbolmaps_directory = File.expand_path("../../BCSymbolMaps", PackageCommandGenerator.dsym_path)
148
148
  available_dsyms = Dir.glob("#{containing_directory}/*.dSYM")
149
+ uuid_regex = /[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}/
149
150
 
150
151
  if Dir.exist?(bcsymbolmaps_directory)
151
152
  UI.message("Mapping dSYM(s) using generated BCSymbolMaps") unless Gym.config[:silent]
152
153
  available_dsyms.each do |dsym|
153
- command = []
154
- command << "dsymutil"
155
- command << "--symbol-map #{bcsymbolmaps_directory.shellescape}"
156
- command << dsym.shellescape
157
- Helper.backticks(command.join(" "), print: !Gym.config[:silent])
154
+ dwarfdump_command = []
155
+ dwarfdump_command << "dwarfdump"
156
+ dwarfdump_command << "--uuid #{dsym.shellescape}"
157
+
158
+ dwarfdump_result = Helper.backticks(dwarfdump_command.join(" "), print: false)
159
+ architecture_infos = dwarfdump_result.split("\n")
160
+ architecture_uuids = architecture_infos.map do |info|
161
+ info_array = info.split(" ")
162
+ uuid = info_array[1]
163
+
164
+ if uuid.nil? || !uuid.match(uuid_regex)
165
+ nil
166
+ else
167
+ uuid
168
+ end
169
+ end
170
+
171
+ architecture_uuids = architecture_uuids.reject(&:nil?)
172
+
173
+ symbol_map_paths = architecture_uuids.map do |uuid|
174
+ "#{bcsymbolmaps_directory.shellescape}/#{uuid}.bcsymbolmap"
175
+ end
176
+
177
+ symbol_map_paths << bcsymbolmaps_directory.shellescape if symbol_map_paths.empty?
178
+
179
+ symbol_map_paths.each do |path|
180
+ command = []
181
+ command << "dsymutil"
182
+ command << "--symbol-map #{path}"
183
+ command << dsym.shellescape
184
+ Helper.backticks(command.join(" "), print: !Gym.config[:silent])
185
+ end
158
186
  end
159
187
  end
160
188