fastlane-plugin-mobile_center 0.1.0 → 0.1.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
  SHA1:
3
- metadata.gz: 658f351985d0f8f3958fb121e99949e346f65029
4
- data.tar.gz: 8ec5929738adbb7d2c219029ea580cc633b70bfb
3
+ metadata.gz: 206959855564f40194901f5cd1bc621df64920f7
4
+ data.tar.gz: 70f542446d51032f5adeae1610fc051045e447e0
5
5
  SHA512:
6
- metadata.gz: 1d5b9afc23e560e849b73926a1dd43c63bff9be52809c09c0cc52225e15c698716eede20531a8364d9d8f8bc97f657cedf15ecdfc66211d396cac35d60a83551
7
- data.tar.gz: 4a9dcc774dd40042d99451ec7d1b5a1f598c291e414aed61d206ad7c984cf1badc7c44fade4ae777e5421c8f8a96f33727516ba68485e6feba53ea4dd6744a46
6
+ metadata.gz: 679066570fab38ec58a7bd2e381bef02b6a411eceb27c58e163e2a58244eb28168367eb4d4631f46c6da7ae7e490eb34e80a562ed3a6a84841410b51e98f39d9
7
+ data.tar.gz: c352b25d0d6f56a800fedff238d2324e26d6f4b9e321564adeaec02404c957e6cb42f5106a127710673d9519e69d1c096e61de370f18c3d991345a6a7d13da63
@@ -45,9 +45,7 @@ module Fastlane
45
45
 
46
46
  case response.status
47
47
  when 200...300
48
- if ENV['DEBUG']
49
- UI.message("DEBUG: #{JSON.pretty_generate(response.body)}\n")
50
- end
48
+ UI.message("DEBUG: #{JSON.pretty_generate(response.body)}\n") if ENV['DEBUG']
51
49
  response.body
52
50
  when 401
53
51
  UI.user_error!("Auth Error, provided invalid token")
@@ -80,9 +78,7 @@ module Fastlane
80
78
 
81
79
  case response.status
82
80
  when 200...300
83
- if ENV['DEBUG']
84
- UI.message("DEBUG: #{JSON.pretty_generate(response.body)}\n")
85
- end
81
+ UI.message("DEBUG: #{JSON.pretty_generate(response.body)}\n") if ENV['DEBUG']
86
82
  response.body
87
83
  when 401
88
84
  UI.user_error!("Auth Error, provided invalid token")
@@ -111,9 +107,7 @@ module Fastlane
111
107
 
112
108
  case response.status
113
109
  when 200...300
114
- if ENV['DEBUG']
115
- UI.message("DEBUG: #{JSON.pretty_generate(response.body)}\n")
116
- end
110
+ UI.message("DEBUG: #{JSON.pretty_generate(response.body)}\n") if ENV['DEBUG']
117
111
  response.body
118
112
  else
119
113
  UI.error("Error #{response.status}: #{response.body}")
@@ -131,7 +125,7 @@ module Fastlane
131
125
  req.headers['x-ms-blob-type'] = "BlockBlob"
132
126
  req.headers['Content-Length'] = File.size(dsym).to_s
133
127
  req.headers['internal-request-source'] = "fastlane"
134
- req.body = Faraday::UploadIO.new(dsym, 'application/octet-stream') if dsym and File.exist?(dsym)
128
+ req.body = Faraday::UploadIO.new(dsym, 'application/octet-stream') if dsym && File.exist?(dsym)
135
129
  end
136
130
 
137
131
  case response.status
@@ -155,7 +149,7 @@ module Fastlane
155
149
  options = {}
156
150
  options[:upload_id] = upload_id
157
151
  # ipa field is used both for .apk and .ipa files
158
- options[:ipa] = Faraday::UploadIO.new(file, 'application/octet-stream') if file and File.exist?(file)
152
+ options[:ipa] = Faraday::UploadIO.new(file, 'application/octet-stream') if file && File.exist?(file)
159
153
 
160
154
  response = connection.post do |req|
161
155
  req.headers['internal-request-source'] = "fastlane"
@@ -189,9 +183,7 @@ module Fastlane
189
183
 
190
184
  case response.status
191
185
  when 200...300
192
- if ENV['DEBUG']
193
- UI.message("DEBUG: #{JSON.pretty_generate(response.body)}\n")
194
- end
186
+ UI.message("DEBUG: #{JSON.pretty_generate(response.body)}\n") if ENV['DEBUG']
195
187
  response.body
196
188
  else
197
189
  UI.error("Error #{response.status}: #{response.body}")
@@ -218,9 +210,7 @@ module Fastlane
218
210
  release = response.body
219
211
  download_url = release['download_url']
220
212
 
221
- if ENV['DEBUG']
222
- UI.message("DEBUG: #{JSON.pretty_generate(release)}")
223
- end
213
+ UI.message("DEBUG: #{JSON.pretty_generate(release)}") if ENV['DEBUG']
224
214
 
225
215
  Actions.lane_context[SharedValues::MOBILE_CENTER_DOWNLOAD_LINK] = download_url
226
216
  Actions.lane_context[SharedValues::MOBILE_CENTER_BUILD_INFORMATION] = release
@@ -250,19 +240,17 @@ module Fastlane
250
240
  dsym_path = nil
251
241
  if dsym
252
242
  # we can use dsym parameter only if build file is ipa
253
- if !file or File.extname(file) == '.ipa'
254
- dsym_path = dsym
255
- end
243
+ dsym_path = dsym if !file || File.extname(file) == '.ipa'
256
244
  else
257
245
  # if dsym is note set, but build is ipa - check default path
258
- if file and File.exist?(file) and File.extname(file) == '.ipa'
246
+ if file && File.exist?(file) && File.extname(file) == '.ipa'
259
247
  dsym_path = file.to_s.gsub('.ipa', '.dSYM.zip')
260
248
  UI.message("dSYM is found")
261
249
  end
262
250
  end
263
251
 
264
252
  # if we provided valid dsym path, or <ipa_path>.dSYM.zip was found, start dSYM upload
265
- if dsym_path and File.exist?(dsym_path)
253
+ if dsym_path && File.exist?(dsym_path)
266
254
  if File.directory?(dsym_path)
267
255
  UI.message("dSYM path is folder, zipping...")
268
256
  dsym_path = Actions::ZipAction.run(path: dsym, output_path: dsym + ".zip")
@@ -296,8 +284,8 @@ module Fastlane
296
284
  params[:apk]
297
285
  ].detect { |e| !e.to_s.empty? }
298
286
 
299
- UI.user_error!("Couldn't find build file at path '#{file}'") unless file and File.exist?(file)
300
- UI.user_error!("No Distribute Group given, pass using `group: 'group name'`") unless group and !group.empty?
287
+ UI.user_error!("Couldn't find build file at path '#{file}'") unless file && File.exist?(file)
288
+ UI.user_error!("No Distribute Group given, pass using `group: 'group name'`") unless group && !group.empty?
301
289
 
302
290
  UI.message("Starting release upload...")
303
291
  upload_details = self.create_release_upload(api_token, owner_name, app_name)
@@ -348,7 +336,7 @@ module Fastlane
348
336
  optional: false,
349
337
  type: String,
350
338
  verify_block: proc do |value|
351
- UI.user_error!("No API token for Mobile Center given, pass using `api_token: 'token'`") unless value and !value.empty?
339
+ UI.user_error!("No API token for Mobile Center given, pass using `api_token: 'token'`") unless value && !value.empty?
352
340
  end),
353
341
 
354
342
  FastlaneCore::ConfigItem.new(key: :owner_name,
@@ -357,7 +345,7 @@ module Fastlane
357
345
  optional: false,
358
346
  type: String,
359
347
  verify_block: proc do |value|
360
- UI.user_error!("No Owner name for Mobile Center given, pass using `owner_name: 'name'`") unless value and !value.empty?
348
+ UI.user_error!("No Owner name for Mobile Center given, pass using `owner_name: 'name'`") unless value && !value.empty?
361
349
  end),
362
350
 
363
351
  FastlaneCore::ConfigItem.new(key: :app_name,
@@ -366,7 +354,7 @@ module Fastlane
366
354
  optional: false,
367
355
  type: String,
368
356
  verify_block: proc do |value|
369
- UI.user_error!("No App name given, pass using `app_name: 'app name'`") unless value and !value.empty?
357
+ UI.user_error!("No App name given, pass using `app_name: 'app name'`") unless value && !value.empty?
370
358
  end),
371
359
 
372
360
  FastlaneCore::ConfigItem.new(key: :apk,
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module MobileCenter
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-mobile_center
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
@@ -106,7 +106,7 @@ files:
106
106
  - lib/fastlane/plugin/mobile_center/actions/mobile_center_upload_action.rb
107
107
  - lib/fastlane/plugin/mobile_center/helper/mobile_center_helper.rb
108
108
  - lib/fastlane/plugin/mobile_center/version.rb
109
- homepage:
109
+ homepage: https://github.com/Microsoft/fastlane-plugin-mobile_center
110
110
  licenses:
111
111
  - MIT
112
112
  metadata: {}