fastlane-plugin-sentry 1.4.1 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
 - data/README.md +30 -3
 - data/lib/fastlane/plugin/sentry/actions/sentry_create_release.rb +1 -1
 - data/lib/fastlane/plugin/sentry/actions/sentry_finalize_release.rb +1 -1
 - data/lib/fastlane/plugin/sentry/actions/sentry_set_commits.rb +79 -0
 - data/lib/fastlane/plugin/sentry/actions/sentry_upload_file.rb +1 -1
 - data/lib/fastlane/plugin/sentry/actions/sentry_upload_proguard.rb +75 -0
 - data/lib/fastlane/plugin/sentry/actions/sentry_upload_sourcemap.rb +22 -2
 - data/lib/fastlane/plugin/sentry/helper/sentry_config.rb +12 -12
 - data/lib/fastlane/plugin/sentry/helper/sentry_helper.rb +3 -3
 - data/lib/fastlane/plugin/sentry/version.rb +2 -2
 - metadata +5 -4
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 2 
     | 
    
         
            +
            SHA256:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 44cdcc376ab1d5eb23be4b3df42df41439d9513223d75da50dce1e2bb355b45e
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 2d704986551776f3541123eb35c57b1929f0ed61e43a38c4b8c246de2e84a112
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 77d45a74189f1150f3ede90a134f7e8b7bf1a62e637fa4631b74dcfac93b7c518593f930c2488bcde7674567b0fd0345647e8dc2379e70eca02057188b97bb84
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: d8240c42154fe0fdc00a36c0f6cba559cddf896a1ba3d321c5ece6ee4a863c1271e03a323fa1fe3efe6e4df782716d256494cc5b0184bb389069a30971b8041e
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -7,7 +7,7 @@ 
     | 
|
| 
       7 
7 
     | 
    
         
             
            </p>
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
            [](https://rubygems.org/gems/fastlane-plugin-sentry)
         
     | 
| 
       10 
     | 
    
         
            -
            [](https://github.com/getsentry/sentry-fastlane/actions?query=workflow%3A"test")
         
     | 
| 
       11 
11 
     | 
    
         
             
            [](https://badge.fury.io/rb/fastlane-plugin-sentry)
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
13 
     | 
    
         
             
            ## Getting Started
         
     | 
| 
         @@ -38,7 +38,7 @@ sentry_upload_dsym( 
     | 
|
| 
       38 
38 
     | 
    
         
             
              auth_token: '...', # Do not use if using api_key
         
     | 
| 
       39 
39 
     | 
    
         
             
              org_slug: '...',
         
     | 
| 
       40 
40 
     | 
    
         
             
              project_slug: '...',
         
     | 
| 
       41 
     | 
    
         
            -
              symbol_maps: 'path to bcsymbols folder' # use this if you have a bcsymbols folder
         
     | 
| 
      
 41 
     | 
    
         
            +
              symbol_maps: 'path to bcsymbols folder', # use this if you have a bcsymbols folder
         
     | 
| 
       42 
42 
     | 
    
         
             
              dsym_path: './App.dSYM.zip',
         
     | 
| 
       43 
43 
     | 
    
         
             
              info_plist: '...' # optional, sentry-cli tries to find the correct plist by itself
         
     | 
| 
       44 
44 
     | 
    
         
             
            )
         
     | 
| 
         @@ -91,6 +91,33 @@ sentry_upload_sourcemap( 
     | 
|
| 
       91 
91 
     | 
    
         
             
            )
         
     | 
| 
       92 
92 
     | 
    
         
             
            ```
         
     | 
| 
       93 
93 
     | 
    
         | 
| 
      
 94 
     | 
    
         
            +
            #### Uploading Proguard Mapping File
         
     | 
| 
      
 95 
     | 
    
         
            +
             
     | 
| 
      
 96 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 97 
     | 
    
         
            +
            sentry_upload_proguard(
         
     | 
| 
      
 98 
     | 
    
         
            +
              api_key: '...', # Do not use if using auth_token
         
     | 
| 
      
 99 
     | 
    
         
            +
              auth_token: '...', # Do not use if using api_key
         
     | 
| 
      
 100 
     | 
    
         
            +
              org_slug: '...',
         
     | 
| 
      
 101 
     | 
    
         
            +
              project_slug: '...',
         
     | 
| 
      
 102 
     | 
    
         
            +
              android_manifest_path: 'path to merged AndroidManifest file' # found in `app/build/intermediates/manifests/full`
         
     | 
| 
      
 103 
     | 
    
         
            +
              mapping_path: 'path to mapping.txt to upload',
         
     | 
| 
      
 104 
     | 
    
         
            +
            )
         
     | 
| 
      
 105 
     | 
    
         
            +
            ```
         
     | 
| 
      
 106 
     | 
    
         
            +
             
     | 
| 
      
 107 
     | 
    
         
            +
            #### Associating commits
         
     | 
| 
      
 108 
     | 
    
         
            +
             
     | 
| 
      
 109 
     | 
    
         
            +
            Useful for telling Sentry which commits are associated with a release.
         
     | 
| 
      
 110 
     | 
    
         
            +
             
     | 
| 
      
 111 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 112 
     | 
    
         
            +
            sentry_set_commits(
         
     | 
| 
      
 113 
     | 
    
         
            +
              version: '...',
         
     | 
| 
      
 114 
     | 
    
         
            +
              app_identifier: '...', # pass in the bundle_identifer of your app
         
     | 
| 
      
 115 
     | 
    
         
            +
              auto: false, # enable completely automated commit management
         
     | 
| 
      
 116 
     | 
    
         
            +
              clear: false, # clear all current commits from the release
         
     | 
| 
      
 117 
     | 
    
         
            +
              commit: '...', # commit spec, see `sentry-cli releases help set-commits` for more information
         
     | 
| 
      
 118 
     | 
    
         
            +
            )
         
     | 
| 
      
 119 
     | 
    
         
            +
            ```
         
     | 
| 
      
 120 
     | 
    
         
            +
             
     | 
| 
       94 
121 
     | 
    
         
             
            ## Issues and Feedback
         
     | 
| 
       95 
122 
     | 
    
         | 
| 
       96 
123 
     | 
    
         
             
            For any other issues and feedback about this plugin, please submit it to this repository.
         
     | 
| 
         @@ -101,7 +128,7 @@ For some more detailed help with plugins problems, check out the [Plugins Troubl 
     | 
|
| 
       101 
128 
     | 
    
         | 
| 
       102 
129 
     | 
    
         
             
            ## Using `fastlane` Plugins
         
     | 
| 
       103 
130 
     | 
    
         | 
| 
       104 
     | 
    
         
            -
            For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https:// 
     | 
| 
      
 131 
     | 
    
         
            +
            For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/) in the main `fastlane` repo.
         
     | 
| 
       105 
132 
     | 
    
         | 
| 
       106 
133 
     | 
    
         
             
            ## About `fastlane`
         
     | 
| 
       107 
134 
     | 
    
         | 
| 
         @@ -8,7 +8,7 @@ module Fastlane 
     | 
|
| 
       8 
8 
     | 
    
         
             
                    Helper::SentryConfig.parse_api_params(params)
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
                    version = params[:version]
         
     | 
| 
       11 
     | 
    
         
            -
                    version = "#{params[:app_identifier]} 
     | 
| 
      
 11 
     | 
    
         
            +
                    version = "#{params[:app_identifier]}@#{params[:version]}" if params[:app_identifier]
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
13 
     | 
    
         
             
                    command = [
         
     | 
| 
       14 
14 
     | 
    
         
             
                      "sentry-cli",
         
     | 
| 
         @@ -8,7 +8,7 @@ module Fastlane 
     | 
|
| 
       8 
8 
     | 
    
         
             
                    Helper::SentryConfig.parse_api_params(params)
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
                    version = params[:version]
         
     | 
| 
       11 
     | 
    
         
            -
                    version = "#{params[:app_identifier]} 
     | 
| 
      
 11 
     | 
    
         
            +
                    version = "#{params[:app_identifier]}@#{params[:version]}" if params[:app_identifier]
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
13 
     | 
    
         
             
                    command = [
         
     | 
| 
       14 
14 
     | 
    
         
             
                      "sentry-cli",
         
     | 
| 
         @@ -0,0 +1,79 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Fastlane
         
     | 
| 
      
 2 
     | 
    
         
            +
              module Actions
         
     | 
| 
      
 3 
     | 
    
         
            +
                class SentrySetCommitsAction < Action
         
     | 
| 
      
 4 
     | 
    
         
            +
                  def self.run(params)
         
     | 
| 
      
 5 
     | 
    
         
            +
                    require 'shellwords'
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
                    Helper::SentryHelper.check_sentry_cli!
         
     | 
| 
      
 8 
     | 
    
         
            +
                    Helper::SentryConfig.parse_api_params(params)
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                    version = params[:version]
         
     | 
| 
      
 11 
     | 
    
         
            +
                    version = "#{params[:app_identifier]}@#{params[:version]}" if params[:app_identifier]
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                    command = [
         
     | 
| 
      
 14 
     | 
    
         
            +
                      "sentry-cli",
         
     | 
| 
      
 15 
     | 
    
         
            +
                      "releases",
         
     | 
| 
      
 16 
     | 
    
         
            +
                      "set-commits",
         
     | 
| 
      
 17 
     | 
    
         
            +
                      version
         
     | 
| 
      
 18 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                    command.push('--auto') if params[:auto]
         
     | 
| 
      
 21 
     | 
    
         
            +
                    command.push('--clear') if params[:clear]
         
     | 
| 
      
 22 
     | 
    
         
            +
                    command.push('--commit').push(params[:commit]) unless params[:commit].nil?
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                    Helper::SentryHelper.call_sentry_cli(command)
         
     | 
| 
      
 25 
     | 
    
         
            +
                    UI.success("Successfully set commits for release: #{version}")
         
     | 
| 
      
 26 
     | 
    
         
            +
                  end
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                  #####################################################
         
     | 
| 
      
 29 
     | 
    
         
            +
                  # @!group Documentation
         
     | 
| 
      
 30 
     | 
    
         
            +
                  #####################################################
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                  def self.description
         
     | 
| 
      
 33 
     | 
    
         
            +
                    "Set commits of a release"
         
     | 
| 
      
 34 
     | 
    
         
            +
                  end
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
                  def self.details
         
     | 
| 
      
 37 
     | 
    
         
            +
                    [
         
     | 
| 
      
 38 
     | 
    
         
            +
                      "This action allows you to set commits in a release for a project on Sentry.",
         
     | 
| 
      
 39 
     | 
    
         
            +
                      "See https://docs.sentry.io/cli/releases/#sentry-cli-commit-integration for more information."
         
     | 
| 
      
 40 
     | 
    
         
            +
                    ].join(" ")
         
     | 
| 
      
 41 
     | 
    
         
            +
                  end
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
                  def self.available_options
         
     | 
| 
      
 44 
     | 
    
         
            +
                    Helper::SentryConfig.common_api_config_items + [
         
     | 
| 
      
 45 
     | 
    
         
            +
                      FastlaneCore::ConfigItem.new(key: :version,
         
     | 
| 
      
 46 
     | 
    
         
            +
                                                   description: "Release version on Sentry"),
         
     | 
| 
      
 47 
     | 
    
         
            +
                      FastlaneCore::ConfigItem.new(key: :app_identifier,
         
     | 
| 
      
 48 
     | 
    
         
            +
                                                  short_option: "-a",
         
     | 
| 
      
 49 
     | 
    
         
            +
                                                  env_name: "SENTRY_APP_IDENTIFIER",
         
     | 
| 
      
 50 
     | 
    
         
            +
                                                  description: "App Bundle Identifier, prepended to version",
         
     | 
| 
      
 51 
     | 
    
         
            +
                                                  optional: true),
         
     | 
| 
      
 52 
     | 
    
         
            +
                      FastlaneCore::ConfigItem.new(key: :auto,
         
     | 
| 
      
 53 
     | 
    
         
            +
                                                  description: "Enable completely automated commit management",
         
     | 
| 
      
 54 
     | 
    
         
            +
                                                  is_string: false,
         
     | 
| 
      
 55 
     | 
    
         
            +
                                                  default_value: false),
         
     | 
| 
      
 56 
     | 
    
         
            +
                      FastlaneCore::ConfigItem.new(key: :clear,
         
     | 
| 
      
 57 
     | 
    
         
            +
                                                  description: "Clear all current commits from the release",
         
     | 
| 
      
 58 
     | 
    
         
            +
                                                  is_string: false,
         
     | 
| 
      
 59 
     | 
    
         
            +
                                                  default_value: false),
         
     | 
| 
      
 60 
     | 
    
         
            +
                      FastlaneCore::ConfigItem.new(key: :commit,
         
     | 
| 
      
 61 
     | 
    
         
            +
                                                  description: "Commit spec, see `sentry-cli releases help set-commits` for more information",
         
     | 
| 
      
 62 
     | 
    
         
            +
                                                  optional: true)
         
     | 
| 
      
 63 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 64 
     | 
    
         
            +
                  end
         
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
      
 66 
     | 
    
         
            +
                  def self.return_value
         
     | 
| 
      
 67 
     | 
    
         
            +
                    nil
         
     | 
| 
      
 68 
     | 
    
         
            +
                  end
         
     | 
| 
      
 69 
     | 
    
         
            +
             
     | 
| 
      
 70 
     | 
    
         
            +
                  def self.authors
         
     | 
| 
      
 71 
     | 
    
         
            +
                    ["brownoxford"]
         
     | 
| 
      
 72 
     | 
    
         
            +
                  end
         
     | 
| 
      
 73 
     | 
    
         
            +
             
     | 
| 
      
 74 
     | 
    
         
            +
                  def self.is_supported?(platform)
         
     | 
| 
      
 75 
     | 
    
         
            +
                    true
         
     | 
| 
      
 76 
     | 
    
         
            +
                  end
         
     | 
| 
      
 77 
     | 
    
         
            +
                end
         
     | 
| 
      
 78 
     | 
    
         
            +
              end
         
     | 
| 
      
 79 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -10,7 +10,7 @@ module Fastlane 
     | 
|
| 
       10 
10 
     | 
    
         
             
                    file = params[:file]
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
12 
     | 
    
         
             
                    version = params[:version]
         
     | 
| 
       13 
     | 
    
         
            -
                    version = "#{params[:app_identifier]} 
     | 
| 
      
 13 
     | 
    
         
            +
                    version = "#{params[:app_identifier]}@#{params[:version]}" if params[:app_identifier]
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
       15 
15 
     | 
    
         
             
                    command = [
         
     | 
| 
       16 
16 
     | 
    
         
             
                      "sentry-cli",
         
     | 
| 
         @@ -0,0 +1,75 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Fastlane
         
     | 
| 
      
 2 
     | 
    
         
            +
              module Actions
         
     | 
| 
      
 3 
     | 
    
         
            +
                class SentryUploadProguardAction < Action
         
     | 
| 
      
 4 
     | 
    
         
            +
                  def self.run(params)
         
     | 
| 
      
 5 
     | 
    
         
            +
                    Helper::SentryHelper.check_sentry_cli!
         
     | 
| 
      
 6 
     | 
    
         
            +
                    Helper::SentryConfig.parse_api_params(params)
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                    # Params - mapping & manifest
         
     | 
| 
      
 9 
     | 
    
         
            +
                    mapping_path = params[:mapping_path]
         
     | 
| 
      
 10 
     | 
    
         
            +
                    android_manifest_path = params[:android_manifest_path]
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                    # Verify files
         
     | 
| 
      
 13 
     | 
    
         
            +
                    UI.user_error!("Mapping file does not exist at path: #{mapping_path}") unless File.exist? mapping_path
         
     | 
| 
      
 14 
     | 
    
         
            +
                    UI.user_error!("AndroidManifest.xml file does not exist at path: #{android_manifest_path}") unless File.exist? android_manifest_path
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                    command = [
         
     | 
| 
      
 17 
     | 
    
         
            +
                      "sentry-cli",
         
     | 
| 
      
 18 
     | 
    
         
            +
                      "upload-proguard",
         
     | 
| 
      
 19 
     | 
    
         
            +
                      "--android-manifest",
         
     | 
| 
      
 20 
     | 
    
         
            +
                      android_manifest_path,
         
     | 
| 
      
 21 
     | 
    
         
            +
                      mapping_path
         
     | 
| 
      
 22 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                    Helper::SentryHelper.call_sentry_cli(command)
         
     | 
| 
      
 25 
     | 
    
         
            +
                    UI.success("Successfully uploaded mapping file!")
         
     | 
| 
      
 26 
     | 
    
         
            +
                  end
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                  #####################################################
         
     | 
| 
      
 29 
     | 
    
         
            +
                  # @!group Documentation
         
     | 
| 
      
 30 
     | 
    
         
            +
                  #####################################################
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                  def self.description
         
     | 
| 
      
 33 
     | 
    
         
            +
                    "Upload mapping to a project on Sentry"
         
     | 
| 
      
 34 
     | 
    
         
            +
                  end
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
                  def self.details
         
     | 
| 
      
 37 
     | 
    
         
            +
                    [
         
     | 
| 
      
 38 
     | 
    
         
            +
                      "This action allows you to upload the proguard mapping file to Sentry.",
         
     | 
| 
      
 39 
     | 
    
         
            +
                      "See https://docs.sentry.io/cli/dif/proguard for more information."
         
     | 
| 
      
 40 
     | 
    
         
            +
                    ].join(" ")
         
     | 
| 
      
 41 
     | 
    
         
            +
                  end
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
                  def self.available_options
         
     | 
| 
      
 44 
     | 
    
         
            +
                    Helper::SentryConfig.common_api_config_items + [
         
     | 
| 
      
 45 
     | 
    
         
            +
                      FastlaneCore::ConfigItem.new(key: :mapping_path,
         
     | 
| 
      
 46 
     | 
    
         
            +
                                                  env_name: "ANDROID_MAPPING_PATH",
         
     | 
| 
      
 47 
     | 
    
         
            +
                                                  description: "Path to your proguard mapping.txt file",
         
     | 
| 
      
 48 
     | 
    
         
            +
                                                  optional: false,
         
     | 
| 
      
 49 
     | 
    
         
            +
                                                  verify_block: proc do |value|
         
     | 
| 
      
 50 
     | 
    
         
            +
                                                    UI.user_error! "Could not find your mapping file at path '#{value}'" unless File.exist?(value)
         
     | 
| 
      
 51 
     | 
    
         
            +
                                                  end),
         
     | 
| 
      
 52 
     | 
    
         
            +
                      FastlaneCore::ConfigItem.new(key: :android_manifest_path,
         
     | 
| 
      
 53 
     | 
    
         
            +
                                                  env_name: "ANDROID_MANIFEST_PATH",
         
     | 
| 
      
 54 
     | 
    
         
            +
                                                  description: "Path to your merged AndroidManifest file. This is usually found under `app/build/intermediates/manifests/full`",
         
     | 
| 
      
 55 
     | 
    
         
            +
                                                  optional: false,
         
     | 
| 
      
 56 
     | 
    
         
            +
                                                  verify_block: proc do |value|
         
     | 
| 
      
 57 
     | 
    
         
            +
                                                    UI.user_error! "Could not find your merged AndroidManifest file at path '#{value}'" unless File.exist?(value)
         
     | 
| 
      
 58 
     | 
    
         
            +
                                                  end)
         
     | 
| 
      
 59 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 60 
     | 
    
         
            +
                  end
         
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
      
 62 
     | 
    
         
            +
                  def self.return_value
         
     | 
| 
      
 63 
     | 
    
         
            +
                    nil
         
     | 
| 
      
 64 
     | 
    
         
            +
                  end
         
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
      
 66 
     | 
    
         
            +
                  def self.authors
         
     | 
| 
      
 67 
     | 
    
         
            +
                    ["mpp-anasa"]
         
     | 
| 
      
 68 
     | 
    
         
            +
                  end
         
     | 
| 
      
 69 
     | 
    
         
            +
             
     | 
| 
      
 70 
     | 
    
         
            +
                  def self.is_supported?(platform)
         
     | 
| 
      
 71 
     | 
    
         
            +
                    platform == :android
         
     | 
| 
      
 72 
     | 
    
         
            +
                  end
         
     | 
| 
      
 73 
     | 
    
         
            +
                end
         
     | 
| 
      
 74 
     | 
    
         
            +
              end
         
     | 
| 
      
 75 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -10,23 +10,36 @@ module Fastlane 
     | 
|
| 
       10 
10 
     | 
    
         
             
                    version = params[:version]
         
     | 
| 
       11 
11 
     | 
    
         
             
                    sourcemap = params[:sourcemap]
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
     | 
    
         
            -
                    version = "#{params[:app_identifier]} 
     | 
| 
      
 13 
     | 
    
         
            +
                    version = "#{params[:app_identifier]}@#{params[:version]}" if params[:app_identifier]
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
       15 
15 
     | 
    
         
             
                    command = [
         
     | 
| 
       16 
16 
     | 
    
         
             
                      "sentry-cli",
         
     | 
| 
       17 
17 
     | 
    
         
             
                      "releases",
         
     | 
| 
       18 
18 
     | 
    
         
             
                      "files",
         
     | 
| 
       19 
     | 
    
         
            -
                       
     | 
| 
      
 19 
     | 
    
         
            +
                      version,
         
     | 
| 
       20 
20 
     | 
    
         
             
                      "upload-sourcemaps",
         
     | 
| 
       21 
21 
     | 
    
         
             
                      sourcemap.to_s
         
     | 
| 
       22 
22 
     | 
    
         
             
                    ]
         
     | 
| 
       23 
23 
     | 
    
         | 
| 
       24 
24 
     | 
    
         
             
                    command.push('--rewrite') if params[:rewrite]
         
     | 
| 
      
 25 
     | 
    
         
            +
                    command.push('--no-rewrite') unless params[:rewrite]
         
     | 
| 
       25 
26 
     | 
    
         
             
                    command.push('--strip-prefix') if params[:strip_prefix]
         
     | 
| 
       26 
27 
     | 
    
         
             
                    command.push('--strip-common-prefix') if params[:strip_common_prefix]
         
     | 
| 
       27 
28 
     | 
    
         
             
                    command.push('--url-prefix').push(params[:url_prefix]) unless params[:url_prefix].nil?
         
     | 
| 
       28 
29 
     | 
    
         
             
                    command.push('--dist').push(params[:dist]) unless params[:dist].nil?
         
     | 
| 
       29 
30 
     | 
    
         | 
| 
      
 31 
     | 
    
         
            +
                    unless params[:ignore].nil?
         
     | 
| 
      
 32 
     | 
    
         
            +
                      # normalize to array
         
     | 
| 
      
 33 
     | 
    
         
            +
                      unless params[:ignore].kind_of?(Enumerable)
         
     | 
| 
      
 34 
     | 
    
         
            +
                        params[:ignore] = [params[:ignore]]
         
     | 
| 
      
 35 
     | 
    
         
            +
                      end
         
     | 
| 
      
 36 
     | 
    
         
            +
                      # no nil or empty strings
         
     | 
| 
      
 37 
     | 
    
         
            +
                      params[:ignore].reject! { |e| e.strip.empty? rescue true }
         
     | 
| 
      
 38 
     | 
    
         
            +
                      command.push('--ignore').push(*params[:ignore]) if params[:ignore].any?
         
     | 
| 
      
 39 
     | 
    
         
            +
                    end
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                    command.push('--ignore-file').push(params[:ignore_file]) unless params[:ignore_file].nil?
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
       30 
43 
     | 
    
         
             
                    Helper::SentryHelper.call_sentry_cli(command)
         
     | 
| 
       31 
44 
     | 
    
         
             
                    UI.success("Successfully uploaded files to release: #{version}")
         
     | 
| 
       32 
45 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -82,6 +95,13 @@ module Fastlane 
     | 
|
| 
       82 
95 
     | 
    
         
             
                                                   short_option: "-a",
         
     | 
| 
       83 
96 
     | 
    
         
             
                                                   env_name: "SENTRY_APP_IDENTIFIER",
         
     | 
| 
       84 
97 
     | 
    
         
             
                                                   description: "App Bundle Identifier, prepended to version",
         
     | 
| 
      
 98 
     | 
    
         
            +
                                                   optional: true),
         
     | 
| 
      
 99 
     | 
    
         
            +
                      FastlaneCore::ConfigItem.new(key: :ignore,
         
     | 
| 
      
 100 
     | 
    
         
            +
                                                   description: "Ignores all files and folders matching the given glob or array of globs",
         
     | 
| 
      
 101 
     | 
    
         
            +
                                                   is_string: false,
         
     | 
| 
      
 102 
     | 
    
         
            +
                                                   optional: true),
         
     | 
| 
      
 103 
     | 
    
         
            +
                      FastlaneCore::ConfigItem.new(key: :ignore_file,
         
     | 
| 
      
 104 
     | 
    
         
            +
                                                   description: "Ignore all files and folders specified in the given ignore file, e.g. .gitignore",
         
     | 
| 
       85 
105 
     | 
    
         
             
                                                   optional: true)
         
     | 
| 
       86 
106 
     | 
    
         | 
| 
       87 
107 
     | 
    
         
             
                    ]
         
     | 
| 
         @@ -41,12 +41,13 @@ module Fastlane 
     | 
|
| 
       41 
41 
     | 
    
         
             
                    has_api_key = !api_key.to_s.empty?
         
     | 
| 
       42 
42 
     | 
    
         
             
                    has_auth_token = !auth_token.to_s.empty?
         
     | 
| 
       43 
43 
     | 
    
         | 
| 
       44 
     | 
    
         
            -
                     
     | 
| 
       45 
     | 
    
         
            -
                     
     | 
| 
       46 
     | 
    
         
            -
                      skip_params_check = fallback_sentry_cli
         
     | 
| 
       47 
     | 
    
         
            -
                    end
         
     | 
| 
      
 44 
     | 
    
         
            +
                    ENV['SENTRY_URL'] = url unless url.to_s.empty?
         
     | 
| 
      
 45 
     | 
    
         
            +
                    ENV['SENTRY_LOG_LEVEL'] = 'INFO' if FastlaneCore::Globals.verbose?
         
     | 
| 
       48 
46 
     | 
    
         | 
| 
       49 
     | 
    
         
            -
                    if  
     | 
| 
      
 47 
     | 
    
         
            +
                    # Fallback to .sentryclirc if possible when no auth token is provided
         
     | 
| 
      
 48 
     | 
    
         
            +
                    if !has_api_key && !has_auth_token && fallback_sentry_cli_auth
         
     | 
| 
      
 49 
     | 
    
         
            +
                        UI.important("No auth config provided, will fallback to .sentryclirc")
         
     | 
| 
      
 50 
     | 
    
         
            +
                    else
         
     | 
| 
       50 
51 
     | 
    
         
             
                      # Will fail if none or both authentication methods are provided
         
     | 
| 
       51 
52 
     | 
    
         
             
                      if !has_api_key && !has_auth_token
         
     | 
| 
       52 
53 
     | 
    
         
             
                        UI.user_error!("No API key or authentication token found for SentryAction given, pass using `api_key: 'key'` or `auth_token: 'token'`")
         
     | 
| 
         @@ -57,21 +58,20 @@ module Fastlane 
     | 
|
| 
       57 
58 
     | 
    
         
             
                      end
         
     | 
| 
       58 
59 
     | 
    
         
             
                      ENV['SENTRY_API_KEY'] = api_key unless api_key.to_s.empty?
         
     | 
| 
       59 
60 
     | 
    
         
             
                      ENV['SENTRY_AUTH_TOKEN'] = auth_token unless auth_token.to_s.empty?
         
     | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
       61 
     | 
    
         
            -
             
     | 
| 
      
 61 
     | 
    
         
            +
                    end
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
                    if has_org && has_project
         
     | 
| 
       62 
64 
     | 
    
         
             
                      ENV['SENTRY_ORG'] = Shellwords.escape(org) unless org.to_s.empty?
         
     | 
| 
       63 
65 
     | 
    
         
             
                      ENV['SENTRY_PROJECT'] = Shellwords.escape(project) unless project.to_s.empty?
         
     | 
| 
       64 
66 
     | 
    
         
             
                    else
         
     | 
| 
       65 
     | 
    
         
            -
                      UI.important("No config provided, will fallback to .sentryclirc")
         
     | 
| 
      
 67 
     | 
    
         
            +
                      UI.important("No org/project config provided, will fallback to .sentryclirc")
         
     | 
| 
       66 
68 
     | 
    
         
             
                    end
         
     | 
| 
       67 
69 
     | 
    
         
             
                  end
         
     | 
| 
       68 
70 
     | 
    
         | 
| 
       69 
     | 
    
         
            -
                  def self. 
     | 
| 
      
 71 
     | 
    
         
            +
                  def self.fallback_sentry_cli_auth
         
     | 
| 
       70 
72 
     | 
    
         
             
                    sentry_cli_result = JSON.parse(`sentry-cli info --config-status-json`)
         
     | 
| 
       71 
73 
     | 
    
         
             
                    return (sentry_cli_result["auth"]["successful"] &&
         
     | 
| 
       72 
     | 
    
         
            -
                      !sentry_cli_result["auth"]["type"].nil? 
     | 
| 
       73 
     | 
    
         
            -
                      !sentry_cli_result["config"]["org"].nil? &&
         
     | 
| 
       74 
     | 
    
         
            -
                      !sentry_cli_result["config"]["project"].nil?)
         
     | 
| 
      
 74 
     | 
    
         
            +
                      !sentry_cli_result["auth"]["type"].nil?)
         
     | 
| 
       75 
75 
     | 
    
         
             
                  end
         
     | 
| 
       76 
76 
     | 
    
         
             
                end
         
     | 
| 
       77 
77 
     | 
    
         
             
              end
         
     | 
| 
         @@ -33,12 +33,12 @@ module Fastlane 
     | 
|
| 
       33 
33 
     | 
    
         
             
                    end
         
     | 
| 
       34 
34 
     | 
    
         
             
                    final_command = command.map { |arg| Shellwords.escape(arg) }.join(" ")
         
     | 
| 
       35 
35 
     | 
    
         
             
                    Open3.popen3(final_command) do |stdin, stdout, stderr, wait_thr|
         
     | 
| 
       36 
     | 
    
         
            -
                      while (line = stderr.gets)
         
     | 
| 
       37 
     | 
    
         
            -
                        error << line.strip!
         
     | 
| 
       38 
     | 
    
         
            -
                      end
         
     | 
| 
       39 
36 
     | 
    
         
             
                      while (line = stdout.gets)
         
     | 
| 
       40 
37 
     | 
    
         
             
                        UI.message(line.strip!)
         
     | 
| 
       41 
38 
     | 
    
         
             
                      end
         
     | 
| 
      
 39 
     | 
    
         
            +
                      while (line = stderr.gets)
         
     | 
| 
      
 40 
     | 
    
         
            +
                        error << line.strip!
         
     | 
| 
      
 41 
     | 
    
         
            +
                      end
         
     | 
| 
       42 
42 
     | 
    
         
             
                      exit_status = wait_thr.value
         
     | 
| 
       43 
43 
     | 
    
         
             
                      unless exit_status.success? && error.empty?
         
     | 
| 
       44 
44 
     | 
    
         
             
                        handle_error(error)
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: fastlane-plugin-sentry
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.8.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Sentry
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2021-03-03 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: pry
         
     | 
| 
         @@ -91,8 +91,10 @@ files: 
     | 
|
| 
       91 
91 
     | 
    
         
             
            - lib/fastlane/plugin/sentry.rb
         
     | 
| 
       92 
92 
     | 
    
         
             
            - lib/fastlane/plugin/sentry/actions/sentry_create_release.rb
         
     | 
| 
       93 
93 
     | 
    
         
             
            - lib/fastlane/plugin/sentry/actions/sentry_finalize_release.rb
         
     | 
| 
      
 94 
     | 
    
         
            +
            - lib/fastlane/plugin/sentry/actions/sentry_set_commits.rb
         
     | 
| 
       94 
95 
     | 
    
         
             
            - lib/fastlane/plugin/sentry/actions/sentry_upload_dsym.rb
         
     | 
| 
       95 
96 
     | 
    
         
             
            - lib/fastlane/plugin/sentry/actions/sentry_upload_file.rb
         
     | 
| 
      
 97 
     | 
    
         
            +
            - lib/fastlane/plugin/sentry/actions/sentry_upload_proguard.rb
         
     | 
| 
       96 
98 
     | 
    
         
             
            - lib/fastlane/plugin/sentry/actions/sentry_upload_sourcemap.rb
         
     | 
| 
       97 
99 
     | 
    
         
             
            - lib/fastlane/plugin/sentry/helper/sentry_config.rb
         
     | 
| 
       98 
100 
     | 
    
         
             
            - lib/fastlane/plugin/sentry/helper/sentry_helper.rb
         
     | 
| 
         @@ -116,8 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       116 
118 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       117 
119 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       118 
120 
     | 
    
         
             
            requirements: []
         
     | 
| 
       119 
     | 
    
         
            -
             
     | 
| 
       120 
     | 
    
         
            -
            rubygems_version: 2.5.2
         
     | 
| 
      
 121 
     | 
    
         
            +
            rubygems_version: 3.0.3
         
     | 
| 
       121 
122 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       122 
123 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       123 
124 
     | 
    
         
             
            summary: Upload symbols to Sentry
         
     |