fastlane-plugin-sentry 1.7.0 → 1.8.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b3d2ba266ef763533fbb5f24ae84132303539fa3e2eb17e764890dafc72eaed2
4
- data.tar.gz: 4196d95ad6ddabe9e9cf29a56987b2fbdd81c8c7b277f98d0538c4c60916b44b
3
+ metadata.gz: 21a116d5b4eb9c0d9ae9fdd57285b00b26056fc95fd868e3c7badb899011a913
4
+ data.tar.gz: 2c705d4ce741a5ba190ed8a9a060e07fb733741fe5978fc7c6affa6cc6360aa9
5
5
  SHA512:
6
- metadata.gz: 1f39b7a290a091f9337b95ae9010fa28bedd2088659a2d204c81b54a0f1f8e68e100f4be52a8bb27f29ac36fb2dc543162f6107b91fb3d720a1419ad279bc2f1
7
- data.tar.gz: 853e766892bdacc0b174cbf39a0f5f018a2a79deeaa9cc95c0aa0b88fd20345cf379ccccf776662bb0dcc9c196c17c8abae4caaf9f77e52200b9595659fb4c75
6
+ metadata.gz: f06720c349c8259d76cf62162cb2fa8423e0341d8109c920146d89fe6396a1cfe863285751e6aeafff41fc09c2471fee46c0d956b60b471728220855c82ff2fe
7
+ data.tar.gz: '0582c4874bfa494c19c2b91b025159ba8c71b966857a0b275b7721688906006f9c96720fb64a22a1af5c064f4ca2557a8b3ff60d6dde5a76dc7c3994c0214b6a'
data/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  </p>
8
8
 
9
9
  [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-sentry)
10
- [![Build Status](https://img.shields.io/travis/getsentry/fastlane-plugin-sentry/master.svg?style=flat)](https://travis-ci.org/getsentry/fastlane-plugin-sentry)
10
+ [![Tests](https://img.shields.io/github/workflow/status/getsentry/sentry-fastlane/test?label=Tests)](https://github.com/getsentry/sentry-fastlane/actions?query=workflow%3A"test")
11
11
  [![Gem Version](https://badge.fury.io/rb/fastlane-plugin-sentry.svg)](https://badge.fury.io/rb/fastlane-plugin-sentry)
12
12
 
13
13
  ## Getting Started
@@ -118,6 +118,27 @@ sentry_set_commits(
118
118
  )
119
119
  ```
120
120
 
121
+ #### Create deploy
122
+
123
+ Creates a new release deployment for a project on Sentry.
124
+
125
+ ```ruby
126
+ sentry_create_deploy(
127
+ api_key: '...', # Do not use if using auth_token
128
+ auth_token: '...', # Do not use if using api_key
129
+ org_slug: '...',
130
+ project_slug: '...',
131
+ version: '...',
132
+ app_identifier: '...', # pass in the bundle_identifer of your app
133
+ env: 'staging', # The environment for this deploy. Required.
134
+ name: '...', # Optional human readable name
135
+ deploy_url: '...', # Optional URL that points to the deployment
136
+ started: 1622630647, # Optional unix timestamp when the deployment started
137
+ finished: 1622630700, # Optional unix timestamp when the deployment finished
138
+ time: 180 # Optional deployment duration in seconds. This can be specified alternatively to `started` and `finished`
139
+ )
140
+ ```
141
+
121
142
  ## Issues and Feedback
122
143
 
123
144
  For any other issues and feedback about this plugin, please submit it to this repository.
@@ -0,0 +1,95 @@
1
+ module Fastlane
2
+ module Actions
3
+ class SentryCreateDeployAction < 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
+ "deploys",
17
+ version,
18
+ "new"
19
+ ]
20
+ command.push('--env').push(params[:env]) unless params[:env].nil?
21
+ command.push('--name').push(params[:name]) unless params[:name].nil?
22
+ command.push('--url').push(params[:deploy_url]) unless params[:deploy_url].nil?
23
+ command.push('--started').push(params[:started]) unless params[:started].nil?
24
+ command.push('--finished').push(params[:finished]) unless params[:finished].nil?
25
+ command.push('--time').push(params[:time]) unless params[:time].nil?
26
+
27
+ Helper::SentryHelper.call_sentry_cli(command)
28
+ UI.success("Successfully created deploy: #{version}")
29
+ end
30
+
31
+ #####################################################
32
+ # @!group Documentation
33
+ #####################################################
34
+
35
+ def self.description
36
+ "Creates a new release deployment for a project on Sentry"
37
+ end
38
+
39
+ def self.details
40
+ [
41
+ "This action allows you to associate deploys to releases for a project on Sentry.",
42
+ "See https://docs.sentry.io/product/cli/releases/#creating-deploys for more information."
43
+ ].join(" ")
44
+ end
45
+
46
+ def self.available_options
47
+ Helper::SentryConfig.common_api_config_items + [
48
+ FastlaneCore::ConfigItem.new(key: :version,
49
+ description: "Release version to associate the deploy with on Sentry"),
50
+ FastlaneCore::ConfigItem.new(key: :env,
51
+ short_option: "-e",
52
+ description: "Set the environment for this release. This argument is required. Values that make sense here would be 'production' or 'staging'",
53
+ optional: false),
54
+ FastlaneCore::ConfigItem.new(key: :name,
55
+ short_option: "-n",
56
+ description: "Optional human readable name for this deployment",
57
+ optional: true),
58
+ FastlaneCore::ConfigItem.new(key: :deploy_url,
59
+ description: "Optional URL that points to the deployment",
60
+ optional: true),
61
+ FastlaneCore::ConfigItem.new(key: :started,
62
+ description: "Optional unix timestamp when the deployment started",
63
+ is_string: false,
64
+ optional: true),
65
+ FastlaneCore::ConfigItem.new(key: :finished,
66
+ description: "Optional unix timestamp when the deployment finished",
67
+ is_string: false,
68
+ optional: true),
69
+ FastlaneCore::ConfigItem.new(key: :time,
70
+ short_option: "-t",
71
+ description: "Optional deployment duration in seconds. This can be specified alternatively to `started` and `finished`",
72
+ is_string: false,
73
+ optional: true),
74
+ FastlaneCore::ConfigItem.new(key: :app_identifier,
75
+ short_option: "-a",
76
+ env_name: "SENTRY_APP_IDENTIFIER",
77
+ description: "App Bundle Identifier, prepended with the version.\nFor example bundle@version",
78
+ optional: true)
79
+ ]
80
+ end
81
+
82
+ def self.return_value
83
+ nil
84
+ end
85
+
86
+ def self.authors
87
+ ["denrase"]
88
+ end
89
+
90
+ def self.is_supported?(platform)
91
+ true
92
+ end
93
+ end
94
+ end
95
+ end
@@ -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]}-#{params[:version]}" if 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]}-#{params[:version]}" if 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]}-#{params[:version]}" if params[:app_identifier]
11
+ version = "#{params[:app_identifier]}@#{params[:version]}" if params[:app_identifier]
12
12
 
13
13
  command = [
14
14
  "sentry-cli",
@@ -10,7 +10,7 @@ module Fastlane
10
10
  file = params[:file]
11
11
 
12
12
  version = params[:version]
13
- version = "#{params[:app_identifier]}-#{params[:version]}" if params[:app_identifier]
13
+ version = "#{params[:app_identifier]}@#{params[:version]}" if params[:app_identifier]
14
14
 
15
15
  command = [
16
16
  "sentry-cli",
@@ -10,21 +10,21 @@ module Fastlane
10
10
  version = params[:version]
11
11
  sourcemap = params[:sourcemap]
12
12
 
13
- version = "#{params[:app_identifier]}-#{params[:version]}" if 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
- Shellwords.escape(version),
19
+ version,
20
20
  "upload-sourcemaps",
21
21
  sourcemap.to_s
22
22
  ]
23
23
 
24
24
  command.push('--rewrite') if params[:rewrite]
25
25
  command.push('--no-rewrite') unless params[:rewrite]
26
- command.push('--strip-prefix') if params[:strip_prefix]
27
- command.push('--strip-common-prefix') if params[:strip_common_prefix]
26
+ command.push('--strip-prefix').push(params[:strip_prefix]) if params[:strip_prefix]
27
+ command.push('--strip-common-prefix').push(params[:strip_common_prefix]) if params[:strip_common_prefix]
28
28
  command.push('--url-prefix').push(params[:url_prefix]) unless params[:url_prefix].nil?
29
29
  command.push('--dist').push(params[:dist]) unless params[:dist].nil?
30
30
 
@@ -42,7 +42,7 @@ module Fastlane
42
42
  has_auth_token = !auth_token.to_s.empty?
43
43
 
44
44
  ENV['SENTRY_URL'] = url unless url.to_s.empty?
45
- ENV['SENTRY_LOG_LEVEL'] = 'INFO' if FastlaneCore::Globals.verbose?
45
+ ENV['SENTRY_LOG_LEVEL'] = 'DEBUG' if FastlaneCore::Globals.verbose?
46
46
 
47
47
  # Fallback to .sentryclirc if possible when no auth token is provided
48
48
  if !has_api_key && !has_auth_token && fallback_sentry_cli_auth
@@ -1,6 +1,6 @@
1
1
  module Fastlane
2
2
  module Sentry
3
- VERSION = "1.7.0"
4
- CLI_VERSION = "1.58.0"
3
+ VERSION = "1.8.3"
4
+ CLI_VERSION = "1.63.1"
5
5
  end
6
6
  end
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.7.0
4
+ version: 1.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sentry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-30 00:00:00.000000000 Z
11
+ date: 2021-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -89,6 +89,7 @@ files:
89
89
  - LICENSE
90
90
  - README.md
91
91
  - lib/fastlane/plugin/sentry.rb
92
+ - lib/fastlane/plugin/sentry/actions/sentry_create_deploy.rb
92
93
  - lib/fastlane/plugin/sentry/actions/sentry_create_release.rb
93
94
  - lib/fastlane/plugin/sentry/actions/sentry_finalize_release.rb
94
95
  - lib/fastlane/plugin/sentry/actions/sentry_set_commits.rb
@@ -118,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
119
  - !ruby/object:Gem::Version
119
120
  version: '0'
120
121
  requirements: []
121
- rubygems_version: 3.0.3
122
+ rubygems_version: 3.1.6
122
123
  signing_key:
123
124
  specification_version: 4
124
125
  summary: Upload symbols to Sentry