fastlane 2.54.0 → 2.54.1

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
  SHA1:
3
- metadata.gz: 4b0e5057dd038fe51f2566e6e003e9bb6ffea30f
4
- data.tar.gz: 21be6de01c31164ab160e45685a9983123341ed4
3
+ metadata.gz: fff3b894fcc5ee5f19b3995cd898b4350bdfa737
4
+ data.tar.gz: 745de41ee0c62f188bd68a0be99ca62bce895ef0
5
5
  SHA512:
6
- metadata.gz: 4aec5f5ee4a8183d8b2a296822e9afb8c04e296c1068114b60d46dc25b085ad5ff42bb5a59581e6b15a1e8ea4c99ee5da5cffd5f15daf3a5ff2c6f602551525c
7
- data.tar.gz: 5e9a703ed1d1834d6d2e5e98f042552775dab51ace991a739faf7f16683ff264c4ee0c6775099c4f3cc45afb29d40397da6bf5619ae75df6c82092fa201472f1
6
+ metadata.gz: 7706122de056e9984ca19d652d6eaadb466a500d11695415d8159c6e7ce26c3421002fd304f33cc2dd9240c843fb780e7c77e0366b9036c33bc14113db4d984b
7
+ data.tar.gz: 8b238b9238fddf280cfe6c120e98481e12620160d21be69fcfdc25628a5a4387b41e90f6b320116465f4c24da4313f17ff9d6ace6a783c754f705d194e9eb43f
@@ -12,7 +12,7 @@ module Deliver
12
12
 
13
13
  EXCEPTION_DIRECTORIES = UploadMetadata::ALL_META_SUB_DIRS.map(&:downcase).freeze
14
14
 
15
- def self.language_folders(root)
15
+ def self.language_folders(root, ignore_validation)
16
16
  folders = Dir.glob(File.join(root, '*'))
17
17
 
18
18
  if Helper.is_test?
@@ -21,7 +21,8 @@ module Deliver
21
21
  available_languages = Spaceship::Tunes.client.available_languages.sort
22
22
  end
23
23
 
24
- allowed_directory_names = (available_languages + SPECIAL_DIR_NAMES).map(&:downcase).freeze
24
+ allowed_directory_names_with_case = (available_languages + SPECIAL_DIR_NAMES)
25
+ allowed_directory_names = allowed_directory_names_with_case.map(&:downcase).freeze
25
26
 
26
27
  selected_folders = folders.select do |path|
27
28
  File.directory?(path) && allowed_directory_names.include?(File.basename(path).downcase)
@@ -33,9 +34,11 @@ module Deliver
33
34
  File.directory?(path) && !allowed_directory_names.include?(normalized_path) && !EXCEPTION_DIRECTORIES.include?(normalized_path)
34
35
  end.sort
35
36
 
36
- unless rejected_folders.empty?
37
+ if !ignore_validation && !rejected_folders.empty?
37
38
  rejected_folders = rejected_folders.map { |path| File.basename(path) }
38
- UI.user_error! "Unsupport directory name(s) for screenshots/metadata: #{rejected_folders.join(', ')}\n\nValid directory names are: #{allowed_directory_names}"
39
+ UI.user_error! "Unsupported directory name(s) for screenshots/metadata in '#{root}': #{rejected_folders.join(', ')}" \
40
+ "\nValid directory names are: #{allowed_directory_names_with_case}" \
41
+ "\n\nEnable 'ignore_language_directory_validation' to prevent this validation from happening"
39
42
  end
40
43
 
41
44
  selected_folders
@@ -315,7 +315,12 @@ module Deliver
315
315
  FastlaneCore::ConfigItem.new(key: :languages,
316
316
  description: "Metadata: List of languages to activate",
317
317
  type: Array,
318
- optional: true)
318
+ optional: true),
319
+ FastlaneCore::ConfigItem.new(key: :ignore_language_directory_validation,
320
+ env_name: "DELIVER_IGNORE_LANGUAGE_DIRECTORY_VALIDATION",
321
+ description: "Ignore errors when invalid languages are found in metadata and screeenshot directories",
322
+ default_value: false,
323
+ is_string: false)
319
324
  ]
320
325
  end
321
326
  end
@@ -158,7 +158,8 @@ module Deliver
158
158
  end
159
159
 
160
160
  # Check folder list (an empty folder signifies a language is required)
161
- Loader.language_folders(options[:metadata_path]).each do |lang_folder|
161
+ ignore_validation = options[:ignore_language_directory_validation]
162
+ Loader.language_folders(options[:metadata_path], ignore_validation).each do |lang_folder|
162
163
  next unless File.directory?(lang_folder) # We don't want to read txt as they are non localised
163
164
  language = File.basename(lang_folder)
164
165
  enabled_languages << language unless enabled_languages.include?(language)
@@ -198,7 +199,8 @@ module Deliver
198
199
  end
199
200
 
200
201
  # Check folder list (an empty folder signifies a language is required)
201
- Loader.language_folders(options[:metadata_path]).each do |lang_folder|
202
+ ignore_validation = options[:ignore_language_directory_validation]
203
+ Loader.language_folders(options[:metadata_path], ignore_validation).each do |lang_folder|
202
204
  next unless File.directory?(lang_folder) # We don't want to read txt as they are non localised
203
205
 
204
206
  language = File.basename(lang_folder)
@@ -252,7 +254,8 @@ module Deliver
252
254
  return if options[:skip_metadata]
253
255
 
254
256
  # Load localised data
255
- Loader.language_folders(options[:metadata_path]).each do |lang_folder|
257
+ ignore_validation = options[:ignore_language_directory_validation]
258
+ Loader.language_folders(options[:metadata_path], ignore_validation).each do |lang_folder|
256
259
  language = File.basename(lang_folder)
257
260
  (LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES).each do |key|
258
261
  path = File.join(lang_folder, "#{key}.txt")
@@ -68,10 +68,12 @@ module Deliver
68
68
 
69
69
  def collect_screenshots(options)
70
70
  return [] if options[:skip_screenshots]
71
- return collect_screenshots_for_languages(options[:screenshots_path])
71
+ return collect_screenshots_for_languages(options)
72
72
  end
73
73
 
74
- def collect_screenshots_for_languages(path)
74
+ def collect_screenshots_for_languages(options)
75
+ path = options[:screenshots_path]
76
+
75
77
  screenshots = []
76
78
  extensions = '{png,jpg,jpeg}'
77
79
 
@@ -79,7 +81,8 @@ module Deliver
79
81
  lang_hash[lang.downcase] = lang
80
82
  end
81
83
 
82
- Loader.language_folders(path).each do |lng_folder|
84
+ ignore_validation = options[:ignore_language_directory_validation]
85
+ Loader.language_folders(path, ignore_validation).each do |lng_folder|
83
86
  language = File.basename(lng_folder)
84
87
 
85
88
  # Check to see if we need to traverse multiple platforms or just a single platform
@@ -2,6 +2,9 @@ module Fastlane
2
2
  module Actions
3
3
  class BadgeAction < Action
4
4
  def self.run(params)
5
+ UI.important('The badge action has been deprecated,')
6
+ UI.important('please checkout the badge plugin here:')
7
+ UI.important('https://github.com/HazAT/fastlane-plugin-badge')
5
8
  Actions.verify_gem!('badge')
6
9
  require 'badge'
7
10
  options = {
@@ -52,7 +55,7 @@ module Fastlane
52
55
  end
53
56
 
54
57
  def self.category
55
- :misc
58
+ :deprecated
56
59
  end
57
60
 
58
61
  def self.available_options
@@ -31,6 +31,8 @@ module Fastlane
31
31
  end
32
32
 
33
33
  select_regex = params[:select_regex] if params[:select_regex] # Overwrite deprecated select_reqex
34
+ select_regex = ensure_regex_is_not_string!(select_regex)
35
+
34
36
  exclude_regex = params[:exclude_regex]
35
37
 
36
38
  files = JSON.parse(File.read(compile_commands)).map do |compile_command|
@@ -90,6 +92,13 @@ module Fastlane
90
92
  return Action.sh(command)
91
93
  end
92
94
 
95
+ # return a proper regex object if regex string is single-quoted
96
+ def self.ensure_regex_is_not_string!(regex)
97
+ return regex unless regex.kind_of?(String)
98
+
99
+ Regexp.new(regex)
100
+ end
101
+
93
102
  #####################################################
94
103
  # @!group Documentation
95
104
  #####################################################
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.54.0'.freeze
2
+ VERSION = '2.54.1'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  MINIMUM_XCODE_RELEASE = "7.0".freeze
5
5
  end
@@ -177,6 +177,18 @@ module FastlaneCore
177
177
  return nil if FastlaneCore::Env.truthy?("FASTLANE_OPT_OUT_USAGE")
178
178
  require 'credentials_manager'
179
179
 
180
+ app_identifier = app_id(args, gem_name)
181
+
182
+ if app_identifier
183
+ return Digest::SHA256.hexdigest("p#{app_identifier}fastlan3_SAlt") # hashed + salted the bundle identifier
184
+ end
185
+
186
+ return nil
187
+ rescue
188
+ return nil
189
+ end
190
+
191
+ def self.app_id(args, gem_name)
180
192
  # check if this is an android project first because some of the same params exist for iOS and Android tools
181
193
  app_identifier = android_app_identifier(args, gem_name)
182
194
  @platform = nil # since have a state in-between runs
@@ -186,14 +198,7 @@ module FastlaneCore
186
198
  app_identifier = ios_app_identifier(args)
187
199
  @platform = :ios if app_identifier
188
200
  end
189
-
190
- if app_identifier
191
- return Digest::SHA256.hexdigest("p#{app_identifier}fastlan3_SAlt") # hashed + salted the bundle identifier
192
- end
193
-
194
- return nil
195
- rescue
196
- return nil
201
+ return app_identifier
197
202
  end
198
203
 
199
204
  def self.send_launch_analytic_events_for(gem_name)
@@ -220,7 +225,7 @@ module FastlaneCore
220
225
  def self.event_for_p_hash(p_hash, tool, platform, timestamp_seconds)
221
226
  {
222
227
  event_source: {
223
- oauth_app_name: 'fastlane-refresher',
228
+ oauth_app_name: oauth_app_name,
224
229
  product: 'fastlane'
225
230
  },
226
231
  actor: {
@@ -236,7 +241,7 @@ module FastlaneCore
236
241
  },
237
242
  secondary_target: {
238
243
  name: 'platform',
239
- detail: platform || 'unknown'
244
+ detail: secondary_target_string(platform || 'unknown')
240
245
  },
241
246
  millis_since_epoch: timestamp_seconds * 1000,
242
247
  version: 1
@@ -246,7 +251,7 @@ module FastlaneCore
246
251
  def self.event_for_launch(tool, ci, timestamp_seconds)
247
252
  {
248
253
  event_source: {
249
- oauth_app_name: 'fastlane-refresher',
254
+ oauth_app_name: oauth_app_name,
250
255
  product: 'fastlane'
251
256
  },
252
257
  actor: {
@@ -260,6 +265,10 @@ module FastlaneCore
260
265
  name: 'ci',
261
266
  detail: ci
262
267
  },
268
+ secondary_target: {
269
+ name: 'launch',
270
+ detail: secondary_target_string('')
271
+ },
263
272
  millis_since_epoch: timestamp_seconds * 1000,
264
273
  version: 1
265
274
  }
@@ -300,7 +309,7 @@ module FastlaneCore
300
309
  def self.event_for_completion(tool, ci, duration, timestamp_seconds)
301
310
  {
302
311
  event_source: {
303
- oauth_app_name: 'fastlane-refresher',
312
+ oauth_app_name: oauth_app_name,
304
313
  product: 'fastlane'
305
314
  },
306
315
  actor: {
@@ -316,7 +325,7 @@ module FastlaneCore
316
325
  },
317
326
  secondary_target: {
318
327
  name: 'ci',
319
- detail: ci
328
+ detail: secondary_target_string(ci)
320
329
  },
321
330
  millis_since_epoch: timestamp_seconds * 1000,
322
331
  version: 1
@@ -326,7 +335,7 @@ module FastlaneCore
326
335
  def self.event_for_install_method(tool, ci, install_method, timestamp_seconds)
327
336
  {
328
337
  event_source: {
329
- oauth_app_name: 'fastlane-refresher',
338
+ oauth_app_name: oauth_app_name,
330
339
  product: 'fastlane'
331
340
  },
332
341
  actor: {
@@ -342,13 +351,21 @@ module FastlaneCore
342
351
  },
343
352
  secondary_target: {
344
353
  name: 'ci',
345
- detail: ci
354
+ detail: secondary_target_string(ci)
346
355
  },
347
356
  millis_since_epoch: timestamp_seconds * 1000,
348
357
  version: 1
349
358
  }
350
359
  end
351
360
 
361
+ def self.secondary_target_string(string)
362
+ return string
363
+ end
364
+
365
+ def self.oauth_app_name
366
+ return 'fastlane-refresher'
367
+ end
368
+
352
369
  def self.send_completion_events(tool, ci, install_method, duration, timestamp_seconds)
353
370
  analytics = []
354
371
  analytics << event_for_completion(tool, ci, duration, timestamp_seconds)
data/gym/README.md CHANGED
@@ -181,8 +181,8 @@ Optional: If _gym_ can't automatically detect the provisioning profiles to use,
181
181
  export_options(
182
182
  method: "app-store",
183
183
  provisioningProfiles: {
184
- "com.example.bundleid": "Provisioning Profile Name",
185
- "com.example.bundleid2": "Provisioning Profile Name 2"
184
+ "com.example.bundleid" => "Provisioning Profile Name",
185
+ "com.example.bundleid2" => "Provisioning Profile Name 2"
186
186
  }
187
187
  )
188
188
  ```
@@ -130,7 +130,7 @@ module Supply
130
130
  def listings
131
131
  ensure_active_edit!
132
132
 
133
- result = call_google_api { android_publisher.list_edit_listings(current_package_name, current_edit.id) }
133
+ result = call_google_api { android_publisher.list_listings(current_package_name, current_edit.id) }
134
134
 
135
135
  return result.listings.map do |row|
136
136
  Listing.new(self, row.language, row)
@@ -142,7 +142,7 @@ module Supply
142
142
  ensure_active_edit!
143
143
 
144
144
  begin
145
- result = android_publisher.get_edit_listing(
145
+ result = android_publisher.get_listing(
146
146
  current_package_name,
147
147
  current_edit.id,
148
148
  language
@@ -159,7 +159,7 @@ module Supply
159
159
  def apks_version_codes
160
160
  ensure_active_edit!
161
161
 
162
- result = call_google_api { android_publisher.list_edit_apks(current_package_name, current_edit.id) }
162
+ result = call_google_api { android_publisher.list_apks(current_package_name, current_edit.id) }
163
163
 
164
164
  return result.apks.map(&:version_code)
165
165
  end
@@ -169,7 +169,7 @@ module Supply
169
169
  ensure_active_edit!
170
170
 
171
171
  result = call_google_api do
172
- android_publisher.list_edit_apklistings(
172
+ android_publisher.list_apk_listings(
173
173
  current_package_name,
174
174
  current_edit.id,
175
175
  apk_version_code
@@ -198,7 +198,7 @@ module Supply
198
198
  })
199
199
 
200
200
  call_google_api do
201
- android_publisher.update_edit_listing(
201
+ android_publisher.update_listing(
202
202
  current_package_name,
203
203
  current_edit.id,
204
204
  language,
@@ -211,7 +211,7 @@ module Supply
211
211
  ensure_active_edit!
212
212
 
213
213
  result_upload = call_google_api do
214
- android_publisher.upload_edit_apk(
214
+ android_publisher.upload_apk(
215
215
  current_package_name,
216
216
  current_edit.id,
217
217
  upload_source: path_to_apk
@@ -225,7 +225,7 @@ module Supply
225
225
  ensure_active_edit!
226
226
 
227
227
  call_google_api do
228
- android_publisher.upload_edit_deobfuscationfile(
228
+ android_publisher.upload_deobfuscationfile(
229
229
  current_package_name,
230
230
  current_edit.id,
231
231
  apk_version_code,
@@ -249,7 +249,7 @@ module Supply
249
249
  })
250
250
 
251
251
  call_google_api do
252
- android_publisher.update_edit_track(
252
+ android_publisher.update_track(
253
253
  current_package_name,
254
254
  current_edit.id,
255
255
  track,
@@ -263,7 +263,7 @@ module Supply
263
263
  ensure_active_edit!
264
264
 
265
265
  begin
266
- result = android_publisher.get_edit_track(
266
+ result = android_publisher.get_track(
267
267
  current_package_name,
268
268
  current_edit.id,
269
269
  track
@@ -284,7 +284,7 @@ module Supply
284
284
  })
285
285
 
286
286
  call_google_api do
287
- android_publisher.update_edit_apklisting(
287
+ android_publisher.update_apk_listing(
288
288
  current_package_name,
289
289
  current_edit.id,
290
290
  apk_listing.apk_version_code,
@@ -302,7 +302,7 @@ module Supply
302
302
  ensure_active_edit!
303
303
 
304
304
  result = call_google_api do
305
- android_publisher.list_edit_images(
305
+ android_publisher.list_images(
306
306
  current_package_name,
307
307
  current_edit.id,
308
308
  language,
@@ -318,7 +318,7 @@ module Supply
318
318
  ensure_active_edit!
319
319
 
320
320
  call_google_api do
321
- android_publisher.upload_edit_image(
321
+ android_publisher.upload_image(
322
322
  current_package_name,
323
323
  current_edit.id,
324
324
  language,
@@ -333,7 +333,7 @@ module Supply
333
333
  ensure_active_edit!
334
334
 
335
335
  call_google_api do
336
- android_publisher.deleteall_edit_image(
336
+ android_publisher.deleteall_image(
337
337
  current_package_name,
338
338
  current_edit.id,
339
339
  language,
@@ -346,7 +346,7 @@ module Supply
346
346
  ensure_active_edit!
347
347
 
348
348
  call_google_api do
349
- android_publisher.upload_edit_expansionfile(
349
+ android_publisher.upload_expansionfile(
350
350
  current_package_name,
351
351
  current_edit.id,
352
352
  apk_version_code,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.54.0
4
+ version: 2.54.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2017-08-22 00:00:00.000000000 Z
18
+ date: 2017-08-24 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: slack-notifier