fastlane 1.24.0 → 1.25.0

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: 336461764c0b6885ff9354c63b43ea624af08754
4
- data.tar.gz: 2dc310d65dbf28a4661291fd6a649e9a9c158443
3
+ metadata.gz: d3dfcedf5ac0b272b5a1c08e2db5cc401152f748
4
+ data.tar.gz: 9c552d89e71e93de66eb151e95d2cb1d31128da8
5
5
  SHA512:
6
- metadata.gz: 75725246d80859a2343169dc987f562725ffad36cd3255ef6966ab224bce72eb50c37f51772c017decbd1c8ad6c877e3dcab2dc446586a034d6b65ff7df03deb
7
- data.tar.gz: 92181b49d70b81cf4b2bc515745e44f19e355a7f1baf3d6933c876f42567df7b2ff5a40b9415f259cf5f5a703804aa29d84f5edb055893ae860ba90c2a29901c
6
+ metadata.gz: c2839d75b434b3f866be56449b9d4f579bb31ccf901d43aa238842d1e5665007d975067fd7eb5ffee2b93b9f316dccf01b0808644a1b3ed41033b9eec588c02f
7
+ data.tar.gz: 76f073a6ed2428e1ca28b32d0e389825f4e471ca2a1edc331197046614c1e111661c263a581ef7309d0cd65a1730006e5047a98a5bf34dfc296e72c109d7fd2e
@@ -22,12 +22,10 @@ default_platform :ios
22
22
 
23
23
 
24
24
  platform :ios do
25
-
26
25
  before_all do
27
26
  # ENV["SLACK_URL"] = "https://hooks.slack.com/services/..."
28
-
29
27
  cocoapods
30
-
28
+ carthage
31
29
  # increment_build_number
32
30
 
33
31
  gym[[SCHEME]] # Build your app - more options available
@@ -70,7 +68,6 @@ platform :ios do
70
68
  # )
71
69
  end
72
70
 
73
-
74
71
  error do |lane, exception|
75
72
  # slack(
76
73
  # message: exception.message,
@@ -4,6 +4,15 @@ module Fastlane
4
4
  def self.run(params)
5
5
  cmd = []
6
6
 
7
+ unless params[:podfile].nil?
8
+ if params[:podfile].end_with?('Podfile')
9
+ podfile_folder = File.dirname(params[:podfile])
10
+ else
11
+ podfile_folder = params[:podfile]
12
+ end
13
+ cmd << ["cd '#{podfile_folder}' &&"]
14
+ end
15
+
7
16
  cmd << ['bundle exec'] if File.exist?('Gemfile') && params[:use_bundle_exec]
8
17
  cmd << ['pod install']
9
18
 
@@ -57,7 +66,15 @@ module Fastlane
57
66
  env_name: "FL_COCOAPODS_USE_BUNDLE_EXEC",
58
67
  description: "Use bundle exec when there is a Gemfile presented",
59
68
  is_string: false,
60
- default_value: true)
69
+ default_value: true),
70
+ FastlaneCore::ConfigItem.new(key: :podfile,
71
+ env_name: "FL_COCOAPODS_PODFILE",
72
+ description: "Explicitly specify the path to the Cocoapods' Podfile. You can either set it to the Podfile's path or to the folder containing the Podfile file",
73
+ optional: true,
74
+ is_string: true,
75
+ verify_block: proc do |value|
76
+ raise "Could not find Podfile".red unless File.exist?(value) || Helper.test?
77
+ end)
61
78
  ]
62
79
  end
63
80
 
@@ -66,7 +83,7 @@ module Fastlane
66
83
  end
67
84
 
68
85
  def self.authors
69
- ["KrauseFx", "tadpol", "birmacher"]
86
+ ["KrauseFx", "tadpol", "birmacher", "Liquidsoul"]
70
87
  end
71
88
  end
72
89
  end
@@ -52,7 +52,7 @@ module Fastlane
52
52
  Helper.log.info 'Build successfully uploaded to HockeyApp!'.green
53
53
  else
54
54
  raise "Error when trying to upload ipa to HockeyApp: #{response.body}".red
55
- end
55
+ end
56
56
  end
57
57
 
58
58
  def self.description
@@ -37,7 +37,7 @@ module Fastlane
37
37
  end
38
38
 
39
39
  def self.authors
40
- ["fabiomassimo", "KrauseFx"]
40
+ ["fabiomassimo", "KrauseFx", "Liquidsoul"]
41
41
  end
42
42
 
43
43
  def self.is_supported?(platform)
@@ -15,8 +15,8 @@ module Fastlane
15
15
  devices = params[:devices]
16
16
  devices_file = params[:devices_file]
17
17
 
18
- credentials = CredentialsManager::PasswordManager.shared_manager(params[:username])
19
- Spaceship::Portal.login(credentials.username, credentials.password)
18
+ credentials = CredentialsManager::AccountManager.new(user: params[:username])
19
+ Spaceship::Portal.login(credentials.user, credentials.password)
20
20
 
21
21
  if devices
22
22
  device_objs = devices.map do |k, v|
@@ -84,10 +84,7 @@ module Fastlane
84
84
  short_option: "-u",
85
85
  env_name: "FASTLANE_USERNAME",
86
86
  description: "Your Apple ID Username",
87
- default_value: ENV["DELIVER_USER"] || CredentialsManager::AppfileConfig.try_fetch_value(:apple_id),
88
- verify_block: proc do |value|
89
- CredentialsManager::PasswordManager.shared_manager(value)
90
- end),
87
+ default_value: CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)),
91
88
  FastlaneCore::ConfigItem.new(key: :version,
92
89
  env_name: "FL_SET_CHANGELOG_VERSION",
93
90
  description: "The version number to create/update",
@@ -14,14 +14,15 @@ module Fastlane
14
14
  Helper.log.info "Will also upload assets #{params[:upload_assets]}.".yellow if params[:upload_assets]
15
15
 
16
16
  require 'json'
17
- body = {
17
+ body_obj = {
18
18
  'tag_name' => params[:tag_name],
19
- 'target_commitish' => params[:commitish],
20
19
  'name' => params[:name],
21
20
  'body' => params[:description],
22
21
  'draft' => params[:is_draft],
23
22
  'prerelease' => params[:is_prerelease]
24
- }.to_json
23
+ }
24
+ body_obj['target_commitish'] = params[:commitish] if params[:commitish]
25
+ body = body_obj.to_json
25
26
 
26
27
  repo_name = params[:repository_name]
27
28
  api_token = params[:api_token]
@@ -0,0 +1,97 @@
1
+ module Fastlane
2
+ module Actions
3
+ class UnlockKeychainAction < Action
4
+ def self.run(params)
5
+ keychain_path = self.expand_keychain_path(params[:path])
6
+ add_to_search_list = params[:add_to_search_list]
7
+
8
+ if keychain_path.empty?
9
+ raise "Could not find the keychain file: #{keychain_path}".red
10
+ end
11
+
12
+ # add to search list if not already added
13
+ if add_to_search_list
14
+ add_keychain_to_search_list(keychain_path)
15
+ end
16
+
17
+ escaped_path = keychain_path.shellescape
18
+ escaped_password = params[:password].shellescape
19
+
20
+ commands = []
21
+ # unlock given keychain and disable lock and timeout
22
+ commands << Fastlane::Actions.sh("security unlock-keychain -p #{escaped_password} #{escaped_path}", log: false)
23
+ commands << Fastlane::Actions.sh("security set-keychain-settings #{escaped_path}", log: false)
24
+ commands
25
+ end
26
+
27
+ def self.add_keychain_to_search_list(keychain_path)
28
+ escaped_path = keychain_path.shellescape
29
+
30
+ result = Fastlane::Actions.sh("security list-keychains", log: false)
31
+
32
+ # add the keychain to the keychains list
33
+ # the basic strategy is to open the keychain file with Keychain Access
34
+ unless result.include?(keychain_path)
35
+ commands = []
36
+ commands << Fastlane::Actions.sh("open #{escaped_path}")
37
+ commands
38
+ end
39
+ end
40
+
41
+ def self.expand_keychain_path(keychain_path)
42
+ possible_locations = []
43
+ possible_locations << keychain_path
44
+ possible_locations << "~/Library/Keychains/#{keychain_path}"
45
+ possible_locations << "~/Library/Keychains/#{keychain_path}.keychain"
46
+
47
+ possible_locations.each do |location|
48
+ expanded_location = File.expand_path(location)
49
+ if File.exist?(expanded_location)
50
+ return expanded_location
51
+ end
52
+ end
53
+
54
+ return ""
55
+ end
56
+
57
+ #####################################################
58
+ # @!group Documentation
59
+ #####################################################
60
+
61
+ def self.description
62
+ "Unlock a keychain"
63
+ end
64
+
65
+ def self.details
66
+ "Unlocks the give keychain file and adds it to the keychain search list"
67
+ end
68
+
69
+ def self.available_options
70
+ [
71
+ FastlaneCore::ConfigItem.new(key: :path,
72
+ env_name: "FL_UNLOCK_KEYCHAIN_PATH",
73
+ description: "Path to the Keychain file",
74
+ optional: false),
75
+ FastlaneCore::ConfigItem.new(key: :password,
76
+ env_name: "FL_UNLOCK_KEYCHAIN_PASSWORD",
77
+ description: "Keychain password",
78
+ optional: false),
79
+ FastlaneCore::ConfigItem.new(key: :add_to_search_list,
80
+ env_name: "FL_UNLOCK_KEYCHAIN_ADD_TO_SEARCH_LIST",
81
+ description: "Add to keychain search list",
82
+ is_string: false,
83
+ default_value: true)
84
+
85
+ ]
86
+ end
87
+
88
+ def self.authors
89
+ ["xfreebird"]
90
+ end
91
+
92
+ def self.is_supported?(platform)
93
+ true
94
+ end
95
+ end
96
+ end
97
+ end
@@ -8,8 +8,8 @@ module Fastlane
8
8
  platform_lane_info = [] # the part that's responsible for the lane/platform definition
9
9
  args.each do |current|
10
10
  if current.include? ":" # that's a key/value which we want to pass to the lane
11
- key, value = current.split(":")
12
- raise "Please pass values like this: key:value" unless key.length > 0 and value.length > 0
11
+ key, value = current.split(":", 2)
12
+ raise "Please pass values like this: key:value" unless key.length > 0
13
13
  value = convert_value(value)
14
14
  Helper.log.debug "Using #{key}: #{value}".green
15
15
  lane_parameters[key.to_sym] = value
@@ -196,41 +196,35 @@ module Fastlane
196
196
  # Checkout the repo
197
197
  repo_name = url.split("/").last
198
198
 
199
- folder = File.join("/tmp", "fl_clones", repo_name)
199
+ clone_folder = File.join("/tmp", "fl_clones", repo_name)
200
200
 
201
201
  branch_option = ""
202
202
  branch_option = "--branch #{branch}" if branch != 'HEAD'
203
203
 
204
- clone_command = "git clone '#{url}' '#{folder}' --depth 1 -n #{branch_option}"
205
-
206
- if File.directory? folder
207
- Helper.log.info "Using existing git repo..."
208
- begin
209
- Actions.sh("cd '#{folder}' && git pull")
210
- rescue
211
- # Something went wrong, clear the folder and pull again
212
- Actions.sh("rm -rf '#{folder}'")
213
- Actions.sh(clone_command)
214
- end
215
- else
216
- # When this fails, we have to clone the git repo
217
- Helper.log.info "Cloning remote git repo..."
218
- Actions.sh(clone_command)
204
+ clone_command = "git clone '#{url}' '#{clone_folder}' --depth 1 -n #{branch_option}"
205
+
206
+ if Dir.exist? clone_folder
207
+ # We want to re-clone if the folder already exists
208
+ Helper.log.info "Deleting existing git repo..."
209
+ Actions.sh("rm -rf '#{clone_folder}'")
219
210
  end
220
211
 
221
- Actions.sh("cd '#{folder}' && git checkout #{branch} '#{path}'")
212
+ Helper.log.info "Cloning remote git repo..."
213
+ Actions.sh(clone_command)
214
+
215
+ Actions.sh("cd '#{clone_folder}' && git checkout #{branch} '#{path}'")
222
216
 
223
217
  # We also want to check out all the local actions of this fastlane setup
224
218
  containing = path.split(File::SEPARATOR)[0..-2]
225
219
  containing = "." if containing.count == 0
226
220
  actions_folder = File.join(containing, "actions")
227
221
  begin
228
- Actions.sh("cd '#{folder}' && git checkout #{branch} '#{actions_folder}'")
222
+ Actions.sh("cd '#{clone_folder}' && git checkout #{branch} '#{actions_folder}'")
229
223
  rescue
230
224
  # We don't care about a failure here, as local actions are optional
231
225
  end
232
226
 
233
- import(File.join(folder, path))
227
+ import(File.join(clone_folder, path))
234
228
  end
235
229
  end
236
230
 
@@ -21,19 +21,24 @@ module Fastlane
21
21
  if Helper.test?
22
22
  result << command # only for the tests
23
23
  else
24
- exit_status = nil
25
- IO.popen(command, err: [:child, :out]) do |io|
26
- io.each do |line|
27
- Helper.log.info ['[SHELL]', line.strip].join(': ')
28
- result << line
24
+ begin
25
+ PTY.spawn(command) do |r, w, pid|
26
+ begin
27
+ r.each_line do |line|
28
+ Helper.log.info ['[SHELL]', line.strip].join(': ')
29
+ result << line
30
+ end
31
+ rescue Errno::EIO
32
+ end
33
+ Process.wait(pid)
29
34
  end
30
- io.close
31
- exit_status = $?.exitstatus
35
+ exit_status = $?.to_i
36
+ rescue PTY::ChildExited => e
37
+ exit_status = e.status.to_i
32
38
  end
33
39
 
34
40
  if exit_status != 0
35
- # this will also append the output to the exception
36
- raise "Exit status of command '#{command}' was #{exit_status} instead of 0. \n#{result}"
41
+ raise "Exit status of command '#{command}' was #{exit_status} instead of 0.\n#{result}"
37
42
  end
38
43
  end
39
44
 
@@ -88,6 +88,7 @@ module Fastlane
88
88
  @tools[:snapshot] = File.exist?(File.join(folder, 'Snapfile'))
89
89
  @tools[:xctool] = File.exist?(File.join(File.expand_path('..', folder), '.xctool-args'))
90
90
  @tools[:cocoapods] = File.exist?(File.join(File.expand_path('..', folder), 'Podfile'))
91
+ @tools[:carthage] = File.exist?(File.join(File.expand_path('..', folder), 'Cartfile'))
91
92
  @tools[:sigh] = false
92
93
  end
93
94
 
@@ -137,7 +138,8 @@ module Fastlane
137
138
  template.gsub!('snapshot', '# snapshot') unless @tools[:snapshot]
138
139
  template.gsub!('sigh', '# sigh') unless @tools[:sigh]
139
140
  template.gsub!('xctool', '# xctool') unless @tools[:xctool]
140
- template.gsub!('cocoapods', '# cocoapods') unless @tools[:cocoapods]
141
+ template.gsub!('cocoapods', '') unless @tools[:cocoapods]
142
+ template.gsub!('carthage', '') unless @tools[:carthage]
141
143
  template.gsub!('[[FASTLANE_VERSION]]', Fastlane::VERSION)
142
144
 
143
145
  @tools.each do |key, value|
@@ -1,3 +1,3 @@
1
1
  module Fastlane
2
- VERSION = '1.24.0'
2
+ VERSION = '1.25.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.24.0
4
+ version: 1.25.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-04 00:00:00.000000000 Z
11
+ date: 2015-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -212,7 +212,7 @@ dependencies:
212
212
  requirements:
213
213
  - - ">="
214
214
  - !ruby/object:Gem::Version
215
- version: 0.15.3
215
+ version: 0.16.1
216
216
  - - "<"
217
217
  - !ruby/object:Gem::Version
218
218
  version: 1.0.0
@@ -222,7 +222,7 @@ dependencies:
222
222
  requirements:
223
223
  - - ">="
224
224
  - !ruby/object:Gem::Version
225
- version: 0.15.3
225
+ version: 0.16.1
226
226
  - - "<"
227
227
  - !ruby/object:Gem::Version
228
228
  version: 1.0.0
@@ -232,7 +232,7 @@ dependencies:
232
232
  requirements:
233
233
  - - ">="
234
234
  - !ruby/object:Gem::Version
235
- version: 0.7.4
235
+ version: 0.8.1
236
236
  - - "<"
237
237
  - !ruby/object:Gem::Version
238
238
  version: 1.0.0
@@ -242,7 +242,7 @@ dependencies:
242
242
  requirements:
243
243
  - - ">="
244
244
  - !ruby/object:Gem::Version
245
- version: 0.7.4
245
+ version: 0.8.1
246
246
  - - "<"
247
247
  - !ruby/object:Gem::Version
248
248
  version: 1.0.0
@@ -252,7 +252,7 @@ dependencies:
252
252
  requirements:
253
253
  - - ">="
254
254
  - !ruby/object:Gem::Version
255
- version: 0.5.3
255
+ version: 0.6.0
256
256
  - - "<"
257
257
  - !ruby/object:Gem::Version
258
258
  version: 1.0.0
@@ -262,7 +262,7 @@ dependencies:
262
262
  requirements:
263
263
  - - ">="
264
264
  - !ruby/object:Gem::Version
265
- version: 0.5.3
265
+ version: 0.6.0
266
266
  - - "<"
267
267
  - !ruby/object:Gem::Version
268
268
  version: 1.0.0
@@ -292,7 +292,7 @@ dependencies:
292
292
  requirements:
293
293
  - - ">="
294
294
  - !ruby/object:Gem::Version
295
- version: 0.9.2
295
+ version: 0.9.3
296
296
  - - "<"
297
297
  - !ruby/object:Gem::Version
298
298
  version: 1.0.0
@@ -302,7 +302,7 @@ dependencies:
302
302
  requirements:
303
303
  - - ">="
304
304
  - !ruby/object:Gem::Version
305
- version: 0.9.2
305
+ version: 0.9.3
306
306
  - - "<"
307
307
  - !ruby/object:Gem::Version
308
308
  version: 1.0.0
@@ -332,7 +332,7 @@ dependencies:
332
332
  requirements:
333
333
  - - ">="
334
334
  - !ruby/object:Gem::Version
335
- version: 0.7.3
335
+ version: 0.8.0
336
336
  - - "<"
337
337
  - !ruby/object:Gem::Version
338
338
  version: 1.0.0
@@ -342,7 +342,7 @@ dependencies:
342
342
  requirements:
343
343
  - - ">="
344
344
  - !ruby/object:Gem::Version
345
- version: 0.7.3
345
+ version: 0.8.0
346
346
  - - "<"
347
347
  - !ruby/object:Gem::Version
348
348
  version: 1.0.0
@@ -352,7 +352,7 @@ dependencies:
352
352
  requirements:
353
353
  - - ">="
354
354
  - !ruby/object:Gem::Version
355
- version: 0.3.1
355
+ version: 0.3.2
356
356
  - - "<"
357
357
  - !ruby/object:Gem::Version
358
358
  version: 1.0.0
@@ -362,7 +362,7 @@ dependencies:
362
362
  requirements:
363
363
  - - ">="
364
364
  - !ruby/object:Gem::Version
365
- version: 0.3.1
365
+ version: 0.3.2
366
366
  - - "<"
367
367
  - !ruby/object:Gem::Version
368
368
  version: 1.0.0
@@ -372,7 +372,7 @@ dependencies:
372
372
  requirements:
373
373
  - - ">="
374
374
  - !ruby/object:Gem::Version
375
- version: 0.10.6
375
+ version: 0.10.7
376
376
  - - "<"
377
377
  - !ruby/object:Gem::Version
378
378
  version: 1.0.0
@@ -382,7 +382,7 @@ dependencies:
382
382
  requirements:
383
383
  - - ">="
384
384
  - !ruby/object:Gem::Version
385
- version: 0.10.6
385
+ version: 0.10.7
386
386
  - - "<"
387
387
  - !ruby/object:Gem::Version
388
388
  version: 1.0.0
@@ -392,7 +392,7 @@ dependencies:
392
392
  requirements:
393
393
  - - ">="
394
394
  - !ruby/object:Gem::Version
395
- version: 0.6.1
395
+ version: 0.6.2
396
396
  - - "<"
397
397
  - !ruby/object:Gem::Version
398
398
  version: 1.0.0
@@ -402,7 +402,7 @@ dependencies:
402
402
  requirements:
403
403
  - - ">="
404
404
  - !ruby/object:Gem::Version
405
- version: 0.6.1
405
+ version: 0.6.2
406
406
  - - "<"
407
407
  - !ruby/object:Gem::Version
408
408
  version: 1.0.0
@@ -412,7 +412,7 @@ dependencies:
412
412
  requirements:
413
413
  - - ">="
414
414
  - !ruby/object:Gem::Version
415
- version: 0.4.5
415
+ version: 0.4.6
416
416
  - - "<"
417
417
  - !ruby/object:Gem::Version
418
418
  version: 1.0.0
@@ -422,7 +422,7 @@ dependencies:
422
422
  requirements:
423
423
  - - ">="
424
424
  - !ruby/object:Gem::Version
425
- version: 0.4.5
425
+ version: 0.4.6
426
426
  - - "<"
427
427
  - !ruby/object:Gem::Version
428
428
  version: 1.0.0
@@ -432,7 +432,7 @@ dependencies:
432
432
  requirements:
433
433
  - - ">="
434
434
  - !ruby/object:Gem::Version
435
- version: 0.1.6
435
+ version: 0.1.7
436
436
  - - "<"
437
437
  - !ruby/object:Gem::Version
438
438
  version: 1.0.0
@@ -442,7 +442,7 @@ dependencies:
442
442
  requirements:
443
443
  - - ">="
444
444
  - !ruby/object:Gem::Version
445
- version: 0.1.6
445
+ version: 0.1.7
446
446
  - - "<"
447
447
  - !ruby/object:Gem::Version
448
448
  version: 1.0.0
@@ -662,6 +662,7 @@ files:
662
662
  - lib/fastlane/actions/testflight.rb
663
663
  - lib/fastlane/actions/testmunk.rb
664
664
  - lib/fastlane/actions/typetalk.rb
665
+ - lib/fastlane/actions/unlock_keychain.rb
665
666
  - lib/fastlane/actions/update_app_group_identifiers.rb
666
667
  - lib/fastlane/actions/update_fastlane.rb
667
668
  - lib/fastlane/actions/update_info_plist.rb
@@ -711,7 +712,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
711
712
  version: '0'
712
713
  requirements: []
713
714
  rubyforge_project:
714
- rubygems_version: 2.4.5
715
+ rubygems_version: 2.4.6
715
716
  signing_key:
716
717
  specification_version: 4
717
718
  summary: Connect all iOS deployment tools into one streamlined workflow