Class: Fastlane::Actions::SentryUploadSnapshotsAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::SentryUploadSnapshotsAction
- Defined in:
- lib/fastlane/plugin/sentry/actions/sentry_upload_snapshots.rb
Documentation collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .return_value ⇒ Object
Class Method Summary collapse
Class Method Details
.authors ⇒ Object
58 59 60 |
# File 'lib/fastlane/plugin/sentry/actions/sentry_upload_snapshots.rb', line 58 def self. ["sentry"] end |
.available_options ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/fastlane/plugin/sentry/actions/sentry_upload_snapshots.rb', line 39 def self. Helper::SentryConfig.common_api_config_items + [ FastlaneCore::ConfigItem.new(key: :path, description: "Path to the folder containing snapshot images", optional: false, verify_block: proc do |value| UI.user_error! "Could not find path '#{value}'" unless File.exist?(value) UI.user_error! "Path is not a directory: '#{value}'" unless File.directory?(value) end), FastlaneCore::ConfigItem.new(key: :app_id, description: "Application identifier", optional: false) ] + Helper::SentryConfig.common_vcs_config_items end |
.description ⇒ Object
31 32 33 |
# File 'lib/fastlane/plugin/sentry/actions/sentry_upload_snapshots.rb', line 31 def self.description "Upload snapshot images to Sentry (EXPERIMENTAL)" end |
.details ⇒ Object
35 36 37 |
# File 'lib/fastlane/plugin/sentry/actions/sentry_upload_snapshots.rb', line 35 def self.details "This action allows you to upload snapshot images to Sentry to check for visual regressions. NOTE: This features is experimental and might be changed in future releases." end |
.is_supported?(platform) ⇒ Boolean
62 63 64 |
# File 'lib/fastlane/plugin/sentry/actions/sentry_upload_snapshots.rb', line 62 def self.is_supported?(platform) [:ios, :android].include?(platform) end |
.return_value ⇒ Object
54 55 56 |
# File 'lib/fastlane/plugin/sentry/actions/sentry_upload_snapshots.rb', line 54 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 |
# File 'lib/fastlane/plugin/sentry/actions/sentry_upload_snapshots.rb', line 4 def self.run(params) Helper::SentryConfig.parse_api_params(params) path = params[:path] app_id = params[:app_id] UI.user_error!("Path does not exist: #{path}") unless File.exist?(path) UI.user_error!("Path is not a directory: #{path}") unless File.directory?(path) command = [ "build", "snapshots", "--app-id", app_id, path ] Helper::SentryConfig.build_vcs_command(command, params) Helper::SentryHelper.call_sentry_cli(params, command) UI.success("Successfully uploaded snapshots!") end |