fastlane-plugin-android_reporter 0.1.33 → 0.1.34

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: 4a4258c145bd5cdccc47f04bce44896d2e53b072c661442c6541fa4f8d719e4f
4
- data.tar.gz: 0af6f30569fb8cbc194849295adb11e285beaed65971b8e6817aae2cd5306927
3
+ metadata.gz: b11bd5afc304d64317d63d89038f5aa5f4ea685a713fecb6b3e742e5adbc4b66
4
+ data.tar.gz: 82c87575e9ec8e988abd5ed535d3e8260896a8a3577239160457946e88239a05
5
5
  SHA512:
6
- metadata.gz: a6c4680f5188b2026e0642ba53848681be2e1edac86ca51aa6d603e6b2c4b67b3e6cc8b1dd23c9f43ee92eafdf04e8202d17b0d720569c837331655e5f6a1a5d
7
- data.tar.gz: 3c9953eb4e494cda10b712bba5d32c34048fe4847419b2d49cfd5d19e3b0988641e5e8929590be4c31219bff6b3e50d82e44873e8b4dceb962d81f90db74150c
6
+ metadata.gz: 7aab5363f08ccc2b0953ec3c7fcb098230eaa7c0c6150f921d7db6aa0259e4445b96db137ec27d3f95820e85249e51ea991ca17d2899c0c855ccfb525b4f8eed
7
+ data.tar.gz: be4ad6bdd4bc014428deca6b8fb4bccfd5cbd3c228165b671601e89f05ef6fd1ef39d9a6efa28103877e19b86238d9f0b0a194492b1cda738cc9df4f6bc98fd1
@@ -112,23 +112,51 @@ module Fastlane
112
112
  if gradle_task_result
113
113
  UI.message("Gradle Task Finished Successfully ...")
114
114
  if params[:generate_adb_file]
115
- Process.fork do
116
- UI.message([
117
- "Android Reporter Started to Save Logcat Logs From ADB Connection Server",
118
- "ADB Reporting File : [logcat.txt]"
119
- ])
120
- sh("adb logcat -d > logcat.txt kill-server")
121
- end
115
+ UI.message([
116
+ "Android Reporter Started to Save Logcat Logs From ADB Connection Server",
117
+ "ADB Reporting File : [logcat.txt]"
118
+ ])
119
+ else
120
+ UI.message("Gradle Task Tests Failed ...")
122
121
  end
123
122
  end
123
+
124
+ Thread.new do
125
+ Process.fork do
126
+ sh("adb logcat -d > logcat.txt kill-server")
127
+ begin
128
+ UI.message("Slack Messages Bot Upload Files Tasks Started ....")
129
+ if(File.exist?("logcat.txt"))
130
+ UI.message("logcat.txt File exists ...")
131
+ client.files_upload(
132
+ channels: "#" + params[:slack_channel_name],
133
+ as_user: true,
134
+ file: Faraday::UploadIO.new('logcat.txt', 'text/plain'),
135
+ title: "Android UI Testing (ADB Logcat Result)",
136
+ filename: "logcat.txt",
137
+ initial_comment: "Current UI Testing Build Result File Report [logcat.txt]"
138
+ )
139
+
140
+ isLogcatFileUploaded = true
141
+ UI.message("Slack Step Upload [logcat.txt]")
142
+ else
143
+ isLogcatFileUploaded = false
144
+ UI.error("File does not exist [logcat.txt]")
145
+ end
146
+ rescue => error
147
+ if error
148
+ UI.error("Something Error with Slack Upload File : [Step Upload Logcat.txt File to Slack]")
149
+ end
150
+ puts error.message
151
+ puts error.backtrace
152
+ end
153
+ end
154
+ end
155
+
124
156
  end
125
- rescue
157
+ rescue => error
126
158
  UI.error("Gradle Task Finished With Error ...")
127
- if params[:generate_adb_file]
128
- Process.fork do
129
- sh("adb logcat -e > logcat.txt kill-server")
130
- end
131
- end
159
+ puts error.backtrace
132
160
  end
133
161
 
134
162
  # 10. Generate Gradle Tasks (Failed and Success Files)
@@ -153,34 +181,6 @@ module Fastlane
153
181
  # 12. Upload Files to Slack if The Build Failed
154
182
  if gradle_task_result == false
155
183
  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
- )
169
-
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
178
- UI.error("Something Error with Slack Upload File : [Step Upload Logcat.txt File to Slack]")
179
- end
180
- puts error.message
181
- puts error.backtrace
182
- end
183
-
184
184
  begin
185
185
  if(File.exist?("android-logs.txt"))
186
186
  UI.message("android-logs.txt File exists ...")
@@ -256,11 +256,12 @@ module Fastlane
256
256
  # 14. If the Gradle Task Success Then Run Specific Lane Else Send Slack Message The Build Failed
257
257
  if gradle_task_result
258
258
  if params[:target_lane_name].to_s.length > 0
259
+ client.chat_postMessage(channel: "#" + params[:slack_channel_name], text: "Testing Result Success : [Fastlane Will Execute this Lane (" + params[:target_lane_name] + ") To Send Build]", as_user: true)
259
260
  sh("fastlane", params[:target_lane_name])
260
261
  end
261
262
  else
262
263
  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)
264
+ client.chat_postMessage(channel: "#" + params[:slack_channel_name], text: "Testing Result Failed : Gradle Testing Task Failed Logs File Should be Uploaded", as_user: true)
264
265
  end
265
266
 
266
267
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AndroidReporter
3
- VERSION = "0.1.33"
3
+ VERSION = "0.1.34"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-android_reporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.33
4
+ version: 0.1.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yazan Tarifi