fastlane-plugin-upload_symbols_to_shake 1.1.1 → 2.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e7b942f3370c9acfa403eb335ca6d79b6140586a27c05ff1c8f5d08f61cd627
4
- data.tar.gz: a67efa149b3c03ff4c86d88698ee3b5af6d907b42256dfa83f51b658c71f5524
3
+ metadata.gz: d88b38e5a09b678b4fe3f65efe2764648c5802cf5df96431a9a138cde57b0126
4
+ data.tar.gz: 58c25436dbc075e88b8cdc06f5d917bf9d948a7972cfb32de8f7ee76181c875d
5
5
  SHA512:
6
- metadata.gz: 5b635b651f8915f1c73f69680d3209a363289ec176098dcd677fd82ef2cab3263a107bd9d48dfdd92ec7b53dbf90d5cdd12f3311774ecf19c9de173dcc5f3bcb
7
- data.tar.gz: d902e09f7bd112421368f9408befd183c9960b9406a31c71529d83c6c5fb31e1ebc249d388d8ff16e59088fae89609cda67815c23e2ba246c281aefe9cea9c7a
6
+ metadata.gz: 16b636cbc150c769cfd98d1c065efaa09e00d66553c085b8bdc33339cf3c2c61bf98f8209d16b5c987605c6a061203fbaf12f5cee9625de48afcfe59f34c881a
7
+ data.tar.gz: bccb62a1769e88872a5aa1a5e0db901a7b75b4a0cdeeb1078d4dffff8a4206c3280c652c6558d87fcdc23c6520147aca3fdbb571f31fa116e65d5098b6e75fcf
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-upload_symbols_to_shake)
4
4
 
5
+ This plugin enables seamless upload of iOS dSYM files to the Shake.
6
+
5
7
  ## Getting Started
6
8
 
7
9
  This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-upload_symbols_to_shake`, add it to your project by running:
@@ -10,42 +12,28 @@ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To
10
12
  fastlane add_plugin upload_symbols_to_shake
11
13
  ```
12
14
 
13
- ## About upload_symbols_to_shake
14
-
15
- Upload dSYM to Shake
16
-
17
- **Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here..
18
-
19
15
  ## Example
20
16
 
21
17
  Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
22
18
 
23
- **Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
24
-
25
- ## Run tests for this plugin
26
-
27
- To run both the tests, and code style validation, run
28
-
29
- ```
30
- rake
31
- ```
32
-
33
- To automatically fix many of the styling issues, use
34
- ```
35
- rubocop -a
36
- ```
37
-
38
- ## Issues and Feedback
39
-
40
- For any other issues and feedback about this plugin, please submit it to this repository.
41
-
42
- ## Troubleshooting
19
+ ## Publishing new version
43
20
 
44
- If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
21
+ 1. Login to RubyGems
22
+ ```
23
+ gem signin
24
+ ```
45
25
 
46
- ## Using _fastlane_ Plugins
26
+ 2. Build plugin
27
+ ```
28
+ gem build fastlane-plugin-upload_symbols_to_shake.gemspec
29
+ ```
47
30
 
48
- For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
31
+ 3. Publish plugin
32
+ ```
33
+ gem push <generated_gem_file_from_step_2>
34
+ ```
35
+
36
+ Don't forget to update plugin version in *version.rb* file before publishing new version.
49
37
 
50
38
  ## About _fastlane_
51
39
 
@@ -9,23 +9,9 @@ module Fastlane
9
9
  def self.run(params)
10
10
  @shake_dsyms_directory = 'Shake_dsym_files_fastlane'
11
11
 
12
- client_id = params[:client_id]
13
- client_secret = params[:client_secret]
12
+ api_key = params[:api_key]
14
13
  endpoint_url = params[:upload_url]
15
14
 
16
- auth_endpoint = "#{endpoint_url}/auth/oauth2/token"
17
- command = "curl --silent -d \"grant_type=client_credentials&client_id=#{client_id}&client_secret=#{client_secret}\" #{auth_endpoint}"
18
-
19
- result = Actions.sh(command)
20
-
21
- json_data = JSON.parse(result)
22
- if json_data.has_key? 'error'
23
- UI.error('Please check your credentials')
24
- return 1
25
- end
26
-
27
- api_token = json_data['access_token']
28
-
29
15
  if params[:app_version_name] == nil && params[:app_version_code] == nil
30
16
  if params[:plist_path] == nil
31
17
  UI.error('Please enter app_version_name and app_version_code or provide path to Info.plist')
@@ -36,7 +22,7 @@ module Fastlane
36
22
  UI.verbose "Path to Info.plist: '#{path}'"
37
23
  code = GetInfoPlistValueAction.run(path: path, key: "CFBundleVersion")
38
24
  name = GetInfoPlistValueAction.run(path: path, key: "CFBundleShortVersionString")
39
-
25
+
40
26
  else
41
27
  name = params[:app_version_name]
42
28
  code = params[:app_version_code]
@@ -44,8 +30,8 @@ module Fastlane
44
30
  end
45
31
 
46
32
  bundle_id = params[:bundle_id]
47
- upload_file_endpoint = "#{endpoint_url}/api/1.0/crash_reporting/app_debug_file/#{bundle_id}"
48
- command = "curl #{upload_file_endpoint} --write-out %{http_code} --silent --output /dev/null -H \"Authorization: Bearer #{api_token}\" -F os=\"iOS\" -F platform=\"iOS\" -F app_version_name=\"#{name}\" -F app_version_code=\"#{code}\" -F file="
33
+ upload_file_endpoint = "#{endpoint_url}/api/2.0/crash_reporting/app_debug_file"
34
+ command = "curl #{upload_file_endpoint} --write-out %{http_code} --silent --output /dev/null -H \"X-API-KEY: #{api_key}\" -H \"X-OS: iOS\" -H \"X-PLATFORM: iOS\" -H \"X-APP-ID: #{bundle_id}\" -F app_version_name=\"#{name}\" -F app_version_code=\"#{code}\" -F file="
49
35
 
50
36
  dsym_paths = []
51
37
  #Paths provided by the user
@@ -74,7 +60,7 @@ module Fastlane
74
60
  if result == '200'
75
61
  UI.success 'dSYM is successfully uploaded to Shake'
76
62
  UI.verbose 'Removing The directory'
77
- else
63
+ else
78
64
  UI.error "Something went wrong during Shake dSYM upload. Status cose is #{result}"
79
65
  end
80
66
 
@@ -102,21 +88,12 @@ module Fastlane
102
88
 
103
89
  def self.available_options
104
90
  [
105
- FastlaneCore::ConfigItem.new(key: :client_id,
106
- description: "Client id used for auth",
107
- type: String,
108
- verify_block: proc do |value|
109
- unless value && !value.empty?
110
- UI.user_error!("No Client id for shake action given, pass using `client_id: 'client id'`")
111
- end
112
- end),
113
-
114
- FastlaneCore::ConfigItem.new(key: :client_secret,
115
- description: "Client secret used for auth",
91
+ FastlaneCore::ConfigItem.new(key: :api_key,
92
+ description: "Api key used for auth",
116
93
  type: String,
117
94
  verify_block: proc do |value|
118
95
  unless value && !value.empty?
119
- UI.user_error!("No Client secret for shake action given, pass using `client_secret: 'client secret'`")
96
+ UI.user_error!("No Api key for shake action given, pass using `api_key: 'api key'`")
120
97
  end
121
98
  end),
122
99
 
@@ -145,8 +122,8 @@ module Fastlane
145
122
  description: "Application version code",
146
123
  optional: true,
147
124
  default_value: nil,
148
- type: Integer),
149
-
125
+ type: Integer),
126
+
150
127
  FastlaneCore::ConfigItem.new(key: :upload_url,
151
128
  description: "Custom endpoint url",
152
129
  default_value: "https://api.shakebugs.com",
@@ -163,7 +140,7 @@ module Fastlane
163
140
  def self.generate_shake_directory
164
141
  cleanup_shake_directory
165
142
  FileUtils.mkdir_p @shake_dsyms_directory
166
- end
143
+ end
167
144
 
168
145
  def self.cleanup_shake_directory
169
146
  FileUtils.rm_f "#{@shake_dsyms_directory}.zip"
@@ -183,7 +160,7 @@ module Fastlane
183
160
  if File.extname(path) == '.dSYM'
184
161
  destination_path = "#{directory_path}/#{File.basename(path)}"
185
162
  FileUtils.copy_entry(path, destination_path) if File.exist?(path)
186
- else
163
+ else
187
164
  Actions.sh("unzip -n #{Shellwords.shellescape(path)} -d #{Shellwords.shellescape(directory_path)}")
188
165
  end
189
166
  end
@@ -193,8 +170,8 @@ module Fastlane
193
170
  file_path = if dsym_path.end_with?('.zip')
194
171
  dsym_path.shellescape
195
172
  else
196
- ZipAction.run(path: dsym_path,
197
- include: [],
173
+ ZipAction.run(path: dsym_path,
174
+ include: [],
198
175
  exclude: []).shellescape
199
176
  end
200
177
  command + "@\"#{Shellwords.shellescape(file_path)}\""
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module UploadSymbolsToShake
3
- VERSION = "1.1.1"
3
+ VERSION = "2.0.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-upload_symbols_to_shake
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shake Team
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-26 00:00:00.000000000 Z
11
+ date: 2024-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -136,7 +136,7 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: 2.171.0
139
- description:
139
+ description:
140
140
  email: team@shakebugs.com
141
141
  executables: []
142
142
  extensions: []
@@ -152,7 +152,7 @@ homepage: https://github.com/shakebugs/fastlane-plugin-shake
152
152
  licenses:
153
153
  - MIT
154
154
  metadata: {}
155
- post_install_message:
155
+ post_install_message:
156
156
  rdoc_options: []
157
157
  require_paths:
158
158
  - lib
@@ -167,8 +167,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  - !ruby/object:Gem::Version
168
168
  version: '0'
169
169
  requirements: []
170
- rubygems_version: 3.0.3
171
- signing_key:
170
+ rubygems_version: 3.1.6
171
+ signing_key:
172
172
  specification_version: 4
173
173
  summary: Upload dSYM to Shake
174
174
  test_files: []