Class: Fastlane::Actions::SentryUploadDsymAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/sentry/actions/sentry_upload_dsym.rb

Documentation collapse

Class Method Summary collapse

Class Method Details

.authorsObject



84
85
86
# File 'lib/fastlane/plugin/sentry/actions/sentry_upload_dsym.rb', line 84

def self.authors
  ["joshdholtz", "HazAT"]
end

.available_optionsObject



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/fastlane/plugin/sentry/actions/sentry_upload_dsym.rb', line 47

def self.available_options
  Helper::SentryConfig.common_api_config_items + [
    FastlaneCore::ConfigItem.new(key: :dsym_path,
                                 env_name: "SENTRY_DSYM_PATH",
                                 description: "Path to your symbols file. For iOS and Mac provide path to app.dSYM.zip",
                                 default_value: Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH],
                                 optional: true,
                                 verify_block: proc do |value|
                                                 UI.user_error! "Could not find Path to your symbols file at path '#{value}'" unless File.exist?(value)
                                               end),
    FastlaneCore::ConfigItem.new(key: :dsym_paths,
                                 env_name: "SENTRY_DSYM_PATHS",
                                 description: "Path to an array of your symbols file. For iOS and Mac provide path to app.dSYM.zip",
                                 default_value: Actions.lane_context[SharedValues::DSYM_PATHS],
                                 is_string: false,
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :symbol_maps,
                                 env_name: "SENTRY_SYMBOL_MAPS",
                                 description: "Optional path to bcsymbolmap files which are used to resolve hidden symbols in the actual dsym files. This requires the dsymutil tool to be available",
                                 optional: true,
                                 verify_block: proc do |value|
                                                 UI.user_error! "Could not find bcsymbolmap at path '#{value}'" unless File.exist?(value)
                                               end),
    FastlaneCore::ConfigItem.new(key: :info_plist,
                                 env_name: "SENTRY_INFO_PLIST",
                                 description: "Optional path to Info.plist to add version information when uploading debug symbols",
                                 optional: true,
                                 verify_block: proc do |value|
                                                 UI.user_error! "Could not find Info.plist at path '#{value}'" unless File.exist?(value)
                                               end)
  ]
end

.descriptionObject



35
36
37
# File 'lib/fastlane/plugin/sentry/actions/sentry_upload_dsym.rb', line 35

def self.description
  "Upload dSYM symbolication files to Sentry"
end

.detailsObject



39
40
41
42
43
44
45
# File 'lib/fastlane/plugin/sentry/actions/sentry_upload_dsym.rb', line 39

def self.details
  [
    "This action allows you to upload symbolication files to Sentry.",
    "It's extra useful if you use it to download the latest dSYM files from Apple when you",
    "use Bitcode"
  ].join(" ")
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


88
89
90
# File 'lib/fastlane/plugin/sentry/actions/sentry_upload_dsym.rb', line 88

def self.is_supported?(platform)
  [:ios, :mac].include?(platform)
end

.return_valueObject



80
81
82
# File 'lib/fastlane/plugin/sentry/actions/sentry_upload_dsym.rb', line 80

def self.return_value
  nil
end

.run(params) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/fastlane/plugin/sentry/actions/sentry_upload_dsym.rb', line 4

def self.run(params)
  UI.deprecated("This action is deprecated. Please use the `sentry_debug_files_upload` action.")

  Helper::SentryConfig.parse_api_params(params)

  # Params - dSYM
  dsym_path = params[:dsym_path]
  dsym_paths = params[:dsym_paths] || []

  # Verify dsym(s)
  dsym_paths += [dsym_path] unless dsym_path.nil?
  dsym_paths = dsym_paths.map { |path| File.absolute_path(path) }
  dsym_paths.each do |path|
    UI.user_error!("dSYM does not exist at path: #{path}") unless File.exist? path
  end

  command = ["upload-dsym"]
  command.push("--symbol-maps") unless params[:symbol_maps].nil?
  command.push(params[:symbol_maps]) unless params[:symbol_maps].nil?
  command.push("--info-plist") unless params[:info_plist].nil?
  command.push(params[:info_plist]) unless params[:info_plist].nil?
  command += dsym_paths

  Helper::SentryHelper.call_sentry_cli(params, command)
  UI.success("Successfully uploaded dSYMs!")
end