Class: Fastlane::Actions::SentryUploadDifAction

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

Documentation collapse

Class Method Summary collapse

Class Method Details

.authorsObject



158
159
160
# File 'lib/fastlane/plugin/sentry/actions/sentry_upload_dif.rb', line 158

def self.authors
  ["denrase"]
end

.available_optionsObject



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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# File 'lib/fastlane/plugin/sentry/actions/sentry_upload_dif.rb', line 54

def self.available_options
  Helper::SentryConfig.common_api_config_items + [
    FastlaneCore::ConfigItem.new(key: :path,
                                 description: "Path or an array of paths to search recursively for symbol files",
                                 type: Array,
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :type,
                                 short_option: "-t",
                                 description: "Only consider debug information files of the given \
                                 type.  By default, all types are considered",
                                 optional: true,
                                 verify_block: proc do |value|
                                   UI.user_error! "Invalid value '#{value}'" unless ['dsym', 'elf', 'breakpad', 'pdb', 'pe', 'sourcebundle', 'bcsymbolmap'].include? value
                                 end),
    FastlaneCore::ConfigItem.new(key: :no_unwind,
                                 description: "Do not scan for stack unwinding information. Specify \
                                 this flag for builds with disabled FPO, or when \
                                 stackwalking occurs on the device. This usually \
                                 excludes executables and dynamic libraries. They might \
                                 still be uploaded, if they contain additional \
                                 processable information (see other flags)",
                                 is_string: false,
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :no_debug,
                                 description: "Do not scan for debugging information. This will \
                                 usually exclude debug companion files. They might \
                                 still be uploaded, if they contain additional \
                                 processable information (see other flags)",
                                 conflicting_options: [:no_unwind],
                                 is_string: false,
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :no_sources,
                                 description: "Do not scan for source information. This will \
                                 usually exclude source bundle files. They might \
                                 still be uploaded, if they contain additional \
                                 processable information (see other flags)",
                                 is_string: false,
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :ids,
                                 description: "Search for specific debug identifiers",
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :require_all,
                                 description: "Errors if not all identifiers specified with --id could be found",
                                 is_string: false,
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :symbol_maps,
                                 description: "Optional path to BCSymbolMap files which are used to \
                                 resolve hidden symbols in dSYM files downloaded from \
                                 iTunes Connect. This requires the dsymutil tool to be \
                                 available",
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :derived_data,
                                 description: "Search for debug symbols in Xcode's derived data",
                                 is_string: false,
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :no_zips,
                                 description: "Do not search in ZIP files",
                                 is_string: false,
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :info_plist,
                                 description: "Optional path to the Info.plist.{n}We will try to find this \
                                 automatically if run from Xcode.  Providing this information \
                                 will associate the debug symbols with a specific ITC application \
                                 and build in Sentry.  Note that if you provide the plist \
                                 explicitly it must already be processed",
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :no_reprocessing,
                                 description: "Do not trigger reprocessing after uploading",
                                 is_string: false,
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :force_foreground,
                                 description: "Wait for the process to finish.{n}\
                                 By default, the upload process will detach and continue in the \
                                 background when triggered from Xcode.  When an error happens, \
                                 a dialog is shown.  If this parameter is passed Xcode will wait \
                                 for the process to finish before the build finishes and output \
                                 will be shown in the Xcode build output",
                                 is_string: false,
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :include_sources,
                                 description: "Include sources from the local file system and upload \
                                 them as source bundles",
                                 is_string: false,
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :wait,
                                 description: "Wait for the server to fully process uploaded files. Errors \
                                 can only be displayed if --wait is specified, but this will \
                                 significantly slow down the upload process",
                                 is_string: false,
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :upload_symbol_maps,
                                 description: "Upload any BCSymbolMap files found to allow Sentry to resolve \
                                 hidden symbols, e.g. when it downloads dSYMs directly from App \
                                 Store Connect or when you upload dSYMs without first resolving \
                                 the hidden symbols using --symbol-maps",
                                 is_string: false,
                                 optional: true)
  ]
end

.descriptionObject



43
44
45
# File 'lib/fastlane/plugin/sentry/actions/sentry_upload_dif.rb', line 43

def self.description
  "Upload debugging information files."
end

.detailsObject



47
48
49
50
51
52
# File 'lib/fastlane/plugin/sentry/actions/sentry_upload_dif.rb', line 47

def self.details
  [
    "Files can be uploaded using the `upload-dif` command. This command will scan a given folder recursively for files and upload them to Sentry.",
    "See https://docs.sentry.io/product/cli/dif/#uploading-files for more information."
  ].join(" ")
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


162
163
164
# File 'lib/fastlane/plugin/sentry/actions/sentry_upload_dif.rb', line 162

def self.is_supported?(platform)
  true
end

.return_valueObject



154
155
156
# File 'lib/fastlane/plugin/sentry/actions/sentry_upload_dif.rb', line 154

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
30
31
32
33
34
35
36
37
# File 'lib/fastlane/plugin/sentry/actions/sentry_upload_dif.rb', line 4

def self.run(params)
  require 'shellwords'

  UI.deprecated("This action is deprecated. Please use the `sentry_debug_files_upload` action.")

  Helper::SentryConfig.parse_api_params(params)

  paths = params[:path]
  paths = ['.'] if paths.nil?

  command = [
    "upload-dif"
  ]
  command += paths

  command.push('--type').push(params[:type]) unless params[:type].nil?
  command.push('--no-unwind') unless params[:no_unwind].nil?
  command.push('--no-debug') unless params[:no_debug].nil?
  command.push('--no-sources') unless params[:no_sources].nil?
  command.push('--ids').push(params[:ids]) unless params[:ids].nil?
  command.push('--require-all') unless params[:require_all].nil?
  command.push('--symbol-maps').push(params[:symbol_maps]) unless params[:symbol_maps].nil?
  command.push('--derived-data') unless params[:derived_data].nil?
  command.push('--no-zips') unless params[:no_zips].nil?
  command.push('--info-plist').push(params[:info_plist]) unless params[:info_plist].nil?
  command.push('--no-reprocessing') unless params[:no_reprocessing].nil?
  command.push('--force-foreground') unless params[:force_foreground].nil?
  command.push('--include-sources') unless params[:include_sources] != true
  command.push('--wait') unless params[:wait].nil?
  command.push('--upload-symbol-maps') unless params[:upload_symbol_maps].nil?

  Helper::SentryHelper.call_sentry_cli(params, command)
  UI.success("Successfully ran upload-dif")
end