class Fastlane::Actions::SentryUploadFileAction
Public Class Methods
available_options()
click to toggle source
# File lib/fastlane/plugin/sentry/actions/sentry_upload_file.rb, line 44 def self.available_options Helper::SentryConfig.common_api_config_items + [ FastlaneCore::ConfigItem.new(key: :version, description: "Release version on Sentry"), FastlaneCore::ConfigItem.new(key: :app_identifier, short_option: "-a", env_name: "SENTRY_APP_IDENTIFIER", description: "App Bundle Identifier, prepended to version", optional: true), FastlaneCore::ConfigItem.new(key: :build, short_option: "-b", description: "Release build on Sentry", optional: true), FastlaneCore::ConfigItem.new(key: :dist, description: "Distribution in release", optional: true), FastlaneCore::ConfigItem.new(key: :file, description: "Path to the file to upload", verify_block: proc do |value| UI.user_error! "Could not find file at path '#{value}'" unless File.exist?(value) end), FastlaneCore::ConfigItem.new(key: :file_url, description: "Optional URL we should associate with the file", optional: true) ] end
description()
click to toggle source
@!group Documentation
# File lib/fastlane/plugin/sentry/actions/sentry_upload_file.rb, line 33 def self.description "Upload files to a release of a project on Sentry" end
details()
click to toggle source
# File lib/fastlane/plugin/sentry/actions/sentry_upload_file.rb, line 37 def self.details [ "This action allows you to upload files to a release of a project on Sentry.", "See https://docs.sentry.io/learn/cli/releases/#upload-files for more information." ].join(" ") end
is_supported?(platform)
click to toggle source
# File lib/fastlane/plugin/sentry/actions/sentry_upload_file.rb, line 79 def self.is_supported?(platform) true end
return_value()
click to toggle source
# File lib/fastlane/plugin/sentry/actions/sentry_upload_file.rb, line 71 def self.return_value nil end
run(params)
click to toggle source
# File lib/fastlane/plugin/sentry/actions/sentry_upload_file.rb, line 4 def self.run(params) require 'shellwords' Helper::SentryConfig.parse_api_params(params) version = params[:version] version = "#{params[:app_identifier]}@#{params[:version]}" if params[:app_identifier] version = "#{version}+#{params[:build]}" if params[:build] file = params[:file] command = [ "releases", "files", version, "upload", file ] command.push(params[:file_url]) unless params[:file_url].nil? command.push("--dist").push(params[:dist]) unless params[:dist].nil? Helper::SentryHelper.call_sentry_cli(params, command) UI.success("Successfully uploaded files to release: #{version}") end