fastlane-plugin-android_reporter 0.1.32 → 0.1.33

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: aa4c112132e19fc087698f039596300a3e7b97685bd21d6e65d40379b3836038
4
- data.tar.gz: c894f5b0b1a8529f02d6ee72ca8d86924e322cd558b0806e00dca22dde6c79a4
3
+ metadata.gz: 4a4258c145bd5cdccc47f04bce44896d2e53b072c661442c6541fa4f8d719e4f
4
+ data.tar.gz: 0af6f30569fb8cbc194849295adb11e285beaed65971b8e6817aae2cd5306927
5
5
  SHA512:
6
- metadata.gz: 9439f2b5d02ea710ab2b316630b3db64371c243a78ca0ed21e6ed3dd051c571e2bdbf14a3ea5e15ee2d4f285b2a8edc1a6ba9fc9ad760ca8e2da6f19ce0512f9
7
- data.tar.gz: dcac33262aebd91396cbf7fca6e2c15f61a1bcb89f0bf520d4102a767e20b6edf61fca14b8bb1df15aefb59c63b3cde0fdfb1e13f3995452f5059d66644bd441
6
+ metadata.gz: a6c4680f5188b2026e0642ba53848681be2e1edac86ca51aa6d603e6b2c4b67b3e6cc8b1dd23c9f43ee92eafdf04e8202d17b0d720569c837331655e5f6a1a5d
7
+ data.tar.gz: 3c9953eb4e494cda10b712bba5d32c34048fe4847419b2d49cfd5d19e3b0988641e5e8929590be4c31219bff6b3e50d82e44873e8b4dceb962d81f90db74150c
@@ -150,113 +150,117 @@ module Fastlane
150
150
  UI.message("Slack Configuration Status : Disabled ...")
151
151
  end
152
152
 
153
- # 12. Upload Files to Slack
154
- if is_slack_enabled
155
- begin
156
- UI.message("Slack Messages Bot Upload Files Tasks Started ....")
157
- UI.message(__dir__)
158
- if(File.exist?("logcat.txt"))
159
- UI.message("logcat.txt File exists ...")
160
- client.files_upload(
161
- channels: "#" + params[:slack_channel_name],
162
- as_user: true,
163
- file: Faraday::UploadIO.new('logcat.txt', 'text/plain'),
164
- title: "Android UI Testing (ADB Logcat Result)",
165
- filename: "logcat.txt",
166
- initial_comment: "Current UI Testing Build Result File Report [logcat.txt]"
167
- )
168
-
169
- isLogcatFileUploaded = true
170
- UI.message("Slack Step Upload [logcat.txt]")
171
- else
172
- isLogcatFileUploaded = false
173
- UI.error("File does not exist [logcat.txt]")
174
- end
175
- rescue => error
176
- if error
177
- UI.error("Something Error with Slack Upload File : [Step Upload Logcat.txt File to Slack]")
178
- end
179
- puts error.message
180
- puts error.backtrace
181
- end
153
+ # 12. Upload Files to Slack if The Build Failed
154
+ if gradle_task_result == false
155
+ if is_slack_enabled
156
+ begin
157
+ UI.message("Slack Messages Bot Upload Files Tasks Started ....")
158
+ UI.message(__dir__)
159
+ if(File.exist?("logcat.txt"))
160
+ UI.message("logcat.txt File exists ...")
161
+ client.files_upload(
162
+ channels: "#" + params[:slack_channel_name],
163
+ as_user: true,
164
+ file: Faraday::UploadIO.new('logcat.txt', 'text/plain'),
165
+ title: "Android UI Testing (ADB Logcat Result)",
166
+ filename: "logcat.txt",
167
+ initial_comment: "Current UI Testing Build Result File Report [logcat.txt]"
168
+ )
182
169
 
183
- begin
184
- if(File.exist?("android-logs.txt"))
185
- UI.message("android-logs.txt File exists ...")
186
- client.files_upload(
187
- channels: "#" + params[:slack_channel_name],
188
- as_user: true,
189
- file: Faraday::UploadIO.new('android-logs.txt', 'text/plain'),
190
- title: "Android UI Testing (Gradle Debug File Result)",
191
- filename: "android-logs.txt",
192
- initial_comment: "Current UI Testing Build Result File Report [Gradle Debug Result]"
193
- )
194
-
195
- isGradleDebugFileUploaded = true
196
- UI.message("Slack Step Upload [android-logs.txt]")
197
- else
198
- isGradleDebugFileUploaded = false
199
- UI.error("File does not exist [android-logs.txt]")
200
- end
201
- rescue => error
202
- if error
170
+ isLogcatFileUploaded = true
171
+ UI.message("Slack Step Upload [logcat.txt]")
172
+ else
173
+ isLogcatFileUploaded = false
174
+ UI.error("File does not exist [logcat.txt]")
175
+ end
176
+ rescue => error
177
+ if error
203
178
  UI.error("Something Error with Slack Upload File : [Step Upload Logcat.txt File to Slack]")
204
- end
179
+ end
205
180
  puts error.message
206
181
  puts error.backtrace
207
- end
182
+ end
208
183
 
209
- begin
210
- if(File.exist?("android-error-logs.txt"))
211
- UI.message("android-error-logs.txt File exists ...")
212
- client.files_upload(
213
- channels: "#" + params[:slack_channel_name],
214
- as_user: true,
215
- file: Faraday::UploadIO.new('android-error-logs.txt', 'text/plain'),
216
- title: "Android UI Testing (Gradle Error File Result)",
217
- filename: "android-error-logs.txt",
218
- initial_comment: "Current UI Testing Build Result File Report [Gradle Error Result]"
219
- )
220
-
221
- isGradleErrorFileUploaded = true
222
- UI.message("Slack Step Upload [android-error-logs.txt]")
223
- else
224
- isGradleErrorFileUploaded = false
225
- UI.error("File does not exist [android-error-logs.txt]")
226
- end
227
- rescue => error
228
- if error
229
- UI.error("Something Error with Slack Upload File : [Step Upload Logcat.txt File to Slack]")
230
- end
231
- puts error.message
232
- puts error.backtrace
233
- end
184
+ begin
185
+ if(File.exist?("android-logs.txt"))
186
+ UI.message("android-logs.txt File exists ...")
187
+ client.files_upload(
188
+ channels: "#" + params[:slack_channel_name],
189
+ as_user: true,
190
+ file: Faraday::UploadIO.new('android-logs.txt', 'text/plain'),
191
+ title: "Android UI Testing (Gradle Debug File Result)",
192
+ filename: "android-logs.txt",
193
+ initial_comment: "Current UI Testing Build Result File Report [Gradle Debug Result]"
194
+ )
234
195
 
235
- # 13. Send Message With Files Summery
236
- slackFinalMessageContent = "Files Status : With Time : " + time + " : \n"
237
- if isGradleDebugFileUploaded
238
- slackFinalMessageContent += "Gradle Debug File Uploaded \n"
239
- end
196
+ isGradleDebugFileUploaded = true
197
+ UI.message("Slack Step Upload [android-logs.txt]")
198
+ else
199
+ isGradleDebugFileUploaded = false
200
+ UI.error("File does not exist [android-logs.txt]")
201
+ end
202
+ rescue => error
203
+ if error
204
+ UI.error("Something Error with Slack Upload File : [Step Upload Logcat.txt File to Slack]")
205
+ end
206
+ puts error.message
207
+ puts error.backtrace
208
+ end
240
209
 
241
- if isGradleErrorFileUploaded
242
- slackFinalMessageContent += "Gradle Error File Uploaded \n"
243
- end
210
+ begin
211
+ if(File.exist?("android-error-logs.txt"))
212
+ UI.message("android-error-logs.txt File exists ...")
213
+ client.files_upload(
214
+ channels: "#" + params[:slack_channel_name],
215
+ as_user: true,
216
+ file: Faraday::UploadIO.new('android-error-logs.txt', 'text/plain'),
217
+ title: "Android UI Testing (Gradle Error File Result)",
218
+ filename: "android-error-logs.txt",
219
+ initial_comment: "Current UI Testing Build Result File Report [Gradle Error Result]"
220
+ )
244
221
 
245
- if isLogcatFileUploaded
246
- slackFinalMessageContent += "Logcat ADB Logging File Uploaded \n"
247
- end
222
+ isGradleErrorFileUploaded = true
223
+ UI.message("Slack Step Upload [android-error-logs.txt]")
224
+ else
225
+ isGradleErrorFileUploaded = false
226
+ UI.error("File does not exist [android-error-logs.txt]")
227
+ end
228
+ rescue => error
229
+ if error
230
+ UI.error("Something Error with Slack Upload File : [Step Upload Logcat.txt File to Slack]")
231
+ end
232
+ puts error.message
233
+ puts error.backtrace
234
+ end
248
235
 
249
- client.chat_postMessage(channel: "#" + params[:slack_channel_name], text: slackFinalMessageContent, as_user: true)
236
+ # 13. Send Message With Files Summery
237
+ slackFinalMessageContent = "Files Status : With Time : " + time + " : \n"
238
+ if isGradleDebugFileUploaded
239
+ slackFinalMessageContent += "Gradle Debug File Uploaded \n"
240
+ end
241
+
242
+ if isGradleErrorFileUploaded
243
+ slackFinalMessageContent += "Gradle Error File Uploaded \n"
244
+ end
250
245
 
251
- # 14. If the Gradle Task Success Then Run Specific Lane Else Send Slack Message The Build Failed
252
- if gradle_task_result
253
- if params[:target_lane_name].to_s.length > 0
254
- sh("fastlane", params[:target_lane_name])
246
+ if isLogcatFileUploaded
247
+ slackFinalMessageContent += "Logcat ADB Logging File Uploaded \n"
255
248
  end
256
- else
257
- UI.message("Gradle Task Result Failed ...")
258
- client.chat_postMessage(channel: "#" + params[:slack_channel_name], text: "Gradle Testing Task Failed Logs File Should be Uploaded", as_user: true)
249
+
250
+ client.chat_postMessage(channel: "#" + params[:slack_channel_name], text: slackFinalMessageContent, as_user: true)
251
+
259
252
  end
253
+
254
+ end
255
+
256
+ # 14. If the Gradle Task Success Then Run Specific Lane Else Send Slack Message The Build Failed
257
+ if gradle_task_result
258
+ if params[:target_lane_name].to_s.length > 0
259
+ sh("fastlane", params[:target_lane_name])
260
+ end
261
+ else
262
+ UI.message("Gradle Task Result Failed ...")
263
+ client.chat_postMessage(channel: "#" + params[:slack_channel_name], text: "Gradle Testing Task Failed Logs File Should be Uploaded", as_user: true)
260
264
  end
261
265
 
262
266
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AndroidReporter
3
- VERSION = "0.1.32"
3
+ VERSION = "0.1.33"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-android_reporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.32
4
+ version: 0.1.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yazan Tarifi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-28 00:00:00.000000000 Z
11
+ date: 2021-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry