class Fastlane::Actions::SentryUploadFileAction
Public Class Methods
available_options()
click to toggle source
# File lib/fastlane/plugin/uninow/sentry/actions/sentry_upload_file.rb, line 45 def self.available_options Helper::SentryConfig.common_api_config_items + [ FastlaneCore::ConfigItem.new(key: :version, description: "Release version on Sentry"), 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), FastlaneCore::ConfigItem.new(key: :app_identifier, short_option: "-a", env_name: "SENTRY_APP_IDENTIFIER", description: "App Bundle Identifier, prepended to version", optional: true) ] end
description()
click to toggle source
@!group Documentation
# File lib/fastlane/plugin/uninow/sentry/actions/sentry_upload_file.rb, line 34 def self.description "Upload files to a release of a project on Sentry" end
details()
click to toggle source
# File lib/fastlane/plugin/uninow/sentry/actions/sentry_upload_file.rb, line 38 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/uninow/sentry/actions/sentry_upload_file.rb, line 76 def self.is_supported?(platform) true end
return_value()
click to toggle source
# File lib/fastlane/plugin/uninow/sentry/actions/sentry_upload_file.rb, line 68 def self.return_value nil end
run(params)
click to toggle source
# File lib/fastlane/plugin/uninow/sentry/actions/sentry_upload_file.rb, line 4 def self.run(params) require 'shellwords' Helper::SentryHelper.check_sentry_cli! Helper::SentryConfig.parse_api_params(params) file = params[:file] version = params[:version] version = "#{params[:app_identifier]}-#{params[:version]}" if params[:app_identifier] command = [ "sentry-cli", "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(command) UI.success("Successfully uploaded files to release: #{version}") end