fastlane 0.10.0 → 0.11.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.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/bin/fastlane +10 -3
  3. data/lib/assets/FastfileTemplate +52 -46
  4. data/lib/fastlane.rb +1 -0
  5. data/lib/fastlane/action.rb +14 -0
  6. data/lib/fastlane/actions/actions_helper.rb +1 -0
  7. data/lib/fastlane/actions/add_git_tag.rb +4 -0
  8. data/lib/fastlane/actions/cert.rb +4 -0
  9. data/lib/fastlane/actions/clean_build_artifacts.rb +4 -0
  10. data/lib/fastlane/actions/commit_version_bump.rb +4 -0
  11. data/lib/fastlane/actions/crashlytics.rb +5 -0
  12. data/lib/fastlane/actions/default_platform.rb +31 -0
  13. data/lib/fastlane/actions/deliver.rb +4 -0
  14. data/lib/fastlane/actions/deploygate.rb +4 -0
  15. data/lib/fastlane/actions/ensure_git_status_clean.rb +4 -0
  16. data/lib/fastlane/actions/fastlane_version.rb +4 -0
  17. data/lib/fastlane/actions/frameit.rb +4 -0
  18. data/lib/fastlane/actions/gcovr.rb +4 -0
  19. data/lib/fastlane/actions/hipchat.rb +4 -0
  20. data/lib/fastlane/actions/hockey.rb +4 -0
  21. data/lib/fastlane/actions/increment_build_number.rb +4 -0
  22. data/lib/fastlane/actions/increment_version_number.rb +4 -0
  23. data/lib/fastlane/actions/install_carthage.rb +4 -0
  24. data/lib/fastlane/actions/install_cocapods.rb +4 -0
  25. data/lib/fastlane/actions/ipa.rb +10 -0
  26. data/lib/fastlane/actions/notify.rb +4 -0
  27. data/lib/fastlane/actions/opt_out_usage.rb +4 -0
  28. data/lib/fastlane/actions/pem.rb +4 -2
  29. data/lib/fastlane/actions/produce.rb +4 -0
  30. data/lib/fastlane/actions/push_to_git_remote.rb +4 -0
  31. data/lib/fastlane/actions/register_devices.rb +4 -0
  32. data/lib/fastlane/actions/reset_git_repo.rb +4 -0
  33. data/lib/fastlane/actions/resign.rb +4 -0
  34. data/lib/fastlane/actions/s3.rb +4 -0
  35. data/lib/fastlane/actions/say.rb +4 -0
  36. data/lib/fastlane/actions/sigh.rb +4 -0
  37. data/lib/fastlane/actions/slack.rb +79 -66
  38. data/lib/fastlane/actions/snapshot.rb +4 -0
  39. data/lib/fastlane/actions/team_id.rb +4 -0
  40. data/lib/fastlane/actions/team_name.rb +4 -0
  41. data/lib/fastlane/actions/testmunk.rb +4 -0
  42. data/lib/fastlane/actions/typetalk.rb +4 -0
  43. data/lib/fastlane/actions/update_project_code_signing.rb +4 -0
  44. data/lib/fastlane/actions/xcode_select.rb +4 -0
  45. data/lib/fastlane/actions/xcodebuild.rb +24 -0
  46. data/lib/fastlane/actions/xctool.rb +4 -0
  47. data/lib/fastlane/docs_generator.rb +37 -17
  48. data/lib/fastlane/fast_file.rb +100 -42
  49. data/lib/fastlane/lane_manager.rb +80 -40
  50. data/lib/fastlane/runner.rb +71 -27
  51. data/lib/fastlane/supported_platforms.rb +18 -0
  52. data/lib/fastlane/version.rb +1 -1
  53. metadata +6 -4
@@ -15,6 +15,10 @@ module Fastlane
15
15
  def author
16
16
  "champo"
17
17
  end
18
+
19
+ def self.is_supported?(platform)
20
+ true
21
+ end
18
22
  end
19
23
  end
20
24
  end
@@ -22,6 +22,10 @@ module Fastlane
22
22
  def self.author
23
23
  "KrauseFx"
24
24
  end
25
+
26
+ def self.is_supported?(platform)
27
+ true
28
+ end
25
29
  end
26
30
  end
27
31
  end
@@ -28,8 +28,6 @@ module Fastlane
28
28
  FastlaneCore::UpdateChecker.show_update_status('pem', PEM::VERSION)
29
29
  end
30
30
  rescue => ex
31
- require 'pry'
32
- binding.pry
33
31
  puts ex
34
32
  end
35
33
 
@@ -55,6 +53,10 @@ module Fastlane
55
53
  require 'pem/options'
56
54
  PEM::Options.available_options
57
55
  end
56
+
57
+ def self.is_supported?(platform)
58
+ platform == :ios
59
+ end
58
60
  end
59
61
  end
60
62
  end
@@ -71,6 +71,10 @@ module Fastlane
71
71
  def self.author
72
72
  "KrauseFx"
73
73
  end
74
+
75
+ def self.is_supported?(platform)
76
+ platform == :ios
77
+ end
74
78
  end
75
79
  end
76
80
  end
@@ -45,6 +45,10 @@ module Fastlane
45
45
  def self.author
46
46
  "lmirosevic"
47
47
  end
48
+
49
+ def self.is_supported?(platform)
50
+ true
51
+ end
48
52
  end
49
53
  end
50
54
  end
@@ -3,6 +3,10 @@ module Fastlane
3
3
  class RegisterDevicesAction < Action
4
4
  UDID_REGEXP = /^\h{40}$/
5
5
 
6
+ def self.is_supported?(platform)
7
+ platform == :ios
8
+ end
9
+
6
10
  def self.run(params)
7
11
  require 'cupertino/provisioning_portal'
8
12
  require 'credentials_manager'
@@ -45,6 +45,10 @@ module Fastlane
45
45
  def self.author
46
46
  'lmirosevic'
47
47
  end
48
+
49
+ def self.is_supported?(platform)
50
+ true
51
+ end
48
52
  end
49
53
  end
50
54
  end
@@ -40,6 +40,10 @@ module Fastlane
40
40
  def self.author
41
41
  "lmirosevic"
42
42
  end
43
+
44
+ def self.is_supported?(platform)
45
+ platform == :ios
46
+ end
43
47
  end
44
48
  end
45
49
  end
@@ -270,6 +270,10 @@ module Fastlane
270
270
  def self.author
271
271
  "joshdholtz"
272
272
  end
273
+
274
+ def self.is_supported?(platform)
275
+ platform == :ios
276
+ end
273
277
  end
274
278
  end
275
279
  end
@@ -9,6 +9,10 @@ module Fastlane
9
9
  def self.description
10
10
  "This action speaks out loud the given text"
11
11
  end
12
+
13
+ def self.is_supported?(platform)
14
+ true
15
+ end
12
16
  end
13
17
  end
14
18
  end
@@ -45,6 +45,10 @@ module Fastlane
45
45
  require 'sigh/options'
46
46
  Sigh::Options.available_options
47
47
  end
48
+
49
+ def self.is_supported?(platform)
50
+ platform == :ios
51
+ end
48
52
  end
49
53
  end
50
54
  end
@@ -16,6 +16,10 @@ module Fastlane
16
16
  nil
17
17
  end
18
18
 
19
+ def self.is_supported?(platform)
20
+ true
21
+ end
22
+
19
23
  # As there is a text limit in the notifications, we are
20
24
  # usually interested in the last part of the message
21
25
  # e.g. for tests
@@ -35,7 +39,6 @@ module Fastlane
35
39
 
36
40
  require 'slack-notifier'
37
41
 
38
- color = (options[:success] ? 'good' : 'danger')
39
42
  options[:message] = self.trim_message(options[:message].to_s || '')
40
43
 
41
44
  options[:message] = Slack::Notifier::LinkFormatter.format(options[:message])
@@ -54,72 +57,9 @@ module Fastlane
54
57
  notifier.channel = ('#' + notifier.channel) unless ['#', '@'].include?(notifier.channel[0]) # send message to channel by default
55
58
  end
56
59
 
57
- should_add_payload = ->(payload_name) { options[:default_payloads].nil? || options[:default_payloads].include?(payload_name) }
58
-
59
- slack_attachment = {
60
- fallback: options[:message],
61
- text: options[:message],
62
- color: color,
63
- fields: []
64
- }
65
-
66
- # custom user payloads
67
- slack_attachment[:fields] += options[:payload].map do |k, v|
68
- {
69
- title: k.to_s,
70
- value: v.to_s,
71
- short: false
72
- }
73
- end
60
+ slack_attachment = generate_slack_attachments(options)
74
61
 
75
- # lane
76
- if should_add_payload[:lane]
77
- slack_attachment[:fields] << {
78
- title: 'Lane',
79
- value: Actions.lane_context[Actions::SharedValues::LANE_NAME],
80
- short: true
81
- }
82
- end
83
-
84
- # test_result
85
- if should_add_payload[:test_result]
86
- slack_attachment[:fields] << {
87
- title: 'Test Result',
88
- value: (options[:success] ? 'Success' : 'Error'),
89
- short: true
90
- }
91
- end
92
-
93
- # git branch
94
- if Actions.git_branch && should_add_payload[:git_branch]
95
- slack_attachment[:fields] << {
96
- title: 'Git Branch',
97
- value: Actions.git_branch,
98
- short: true
99
- }
100
- end
101
-
102
- # git_author
103
- if git_author && should_add_payload[:git_author]
104
- if ENV['FASTLANE_SLACK_HIDE_AUTHOR_ON_SUCCESS'] && options[:success]
105
- # We only show the git author if the build failed
106
- else
107
- slack_attachment[:fields] << {
108
- title: 'Git Author',
109
- value: git_author,
110
- short: true
111
- }
112
- end
113
- end
114
-
115
- # last_git_commit
116
- if last_git_commit && should_add_payload[:last_git_commit]
117
- slack_attachment[:fields] << {
118
- title: 'Git Commit',
119
- value: last_git_commit,
120
- short: false
121
- }
122
- end
62
+ return [notifier, slack_attachment] if Helper.is_test? # tests will verify the slack attachments and other properties
123
63
 
124
64
  result = notifier.ping '',
125
65
  icon_url: 'https://s3-eu-west-1.amazonaws.com/fastlane.tools/fastlane.png',
@@ -150,6 +90,79 @@ module Fastlane
150
90
  def self.author
151
91
  "KrauseFx"
152
92
  end
93
+
94
+ private
95
+ def self.generate_slack_attachments(options)
96
+ color = (options[:success] ? 'good' : 'danger')
97
+ should_add_payload = ->(payload_name) { options[:default_payloads].nil? || options[:default_payloads].include?(payload_name) }
98
+
99
+ slack_attachment = {
100
+ fallback: options[:message],
101
+ text: options[:message],
102
+ color: color,
103
+ fields: []
104
+ }
105
+
106
+ # custom user payloads
107
+ slack_attachment[:fields] += options[:payload].map do |k, v|
108
+ {
109
+ title: k.to_s,
110
+ value: v.to_s,
111
+ short: false
112
+ }
113
+ end
114
+
115
+ # lane
116
+ if should_add_payload[:lane]
117
+ slack_attachment[:fields] << {
118
+ title: 'Lane',
119
+ value: Actions.lane_context[Actions::SharedValues::LANE_NAME],
120
+ short: true
121
+ }
122
+ end
123
+
124
+ # test_result
125
+ if should_add_payload[:test_result]
126
+ slack_attachment[:fields] << {
127
+ title: 'Test Result',
128
+ value: (options[:success] ? 'Success' : 'Error'),
129
+ short: true
130
+ }
131
+ end
132
+
133
+ # git branch
134
+ if Actions.git_branch && should_add_payload[:git_branch]
135
+ slack_attachment[:fields] << {
136
+ title: 'Git Branch',
137
+ value: Actions.git_branch,
138
+ short: true
139
+ }
140
+ end
141
+
142
+ # git_author
143
+ if git_author && should_add_payload[:git_author]
144
+ if ENV['FASTLANE_SLACK_HIDE_AUTHOR_ON_SUCCESS'] && options[:success]
145
+ # We only show the git author if the build failed
146
+ else
147
+ slack_attachment[:fields] << {
148
+ title: 'Git Author',
149
+ value: git_author,
150
+ short: true
151
+ }
152
+ end
153
+ end
154
+
155
+ # last_git_commit
156
+ if last_git_commit && should_add_payload[:last_git_commit]
157
+ slack_attachment[:fields] << {
158
+ title: 'Git Commit',
159
+ value: last_git_commit,
160
+ short: false
161
+ }
162
+ end
163
+
164
+ slack_attachment
165
+ end
153
166
  end
154
167
  end
155
168
  end
@@ -47,6 +47,10 @@ module Fastlane
47
47
  def self.author
48
48
  "KrauseFx"
49
49
  end
50
+
51
+ def self.is_supported?(platform)
52
+ platform == :ios
53
+ end
50
54
  end
51
55
  end
52
56
  end
@@ -22,6 +22,10 @@ module Fastlane
22
22
  def self.description
23
23
  "Specify the Team ID you want to use for the Apple Developer Portal"
24
24
  end
25
+
26
+ def self.is_supported?(platform)
27
+ platform == :ios
28
+ end
25
29
  end
26
30
  end
27
31
  end
@@ -22,6 +22,10 @@ module Fastlane
22
22
  def self.author
23
23
  "KrauseFx"
24
24
  end
25
+
26
+ def self.is_supported?(platform)
27
+ platform == :ios
28
+ end
25
29
  end
26
30
  end
27
31
  end
@@ -49,6 +49,10 @@ module Fastlane
49
49
  def self.author
50
50
  "mposchen"
51
51
  end
52
+
53
+ def self.is_supported?(platform)
54
+ platform == :ios
55
+ end
52
56
  end
53
57
  end
54
58
  end
@@ -68,6 +68,10 @@ module Fastlane
68
68
  def self.author
69
69
  "dataich"
70
70
  end
71
+
72
+ def self.is_supported?(platform)
73
+ true
74
+ end
71
75
  end
72
76
  end
73
77
  end
@@ -31,6 +31,10 @@ module Fastlane
31
31
  def self.author
32
32
  "KrauseFx"
33
33
  end
34
+
35
+ def self.is_supported?(platform)
36
+ platform == :ios
37
+ end
34
38
  end
35
39
  end
36
40
  end
@@ -39,6 +39,10 @@ module Fastlane
39
39
  def self.author
40
40
  "dtrenz"
41
41
  end
42
+
43
+ def self.is_supported?(platform)
44
+ platform == :ios
45
+ end
42
46
  end
43
47
  end
44
48
  end
@@ -42,6 +42,10 @@ module Fastlane
42
42
  xcconfig: "-xcconfig"
43
43
  }
44
44
 
45
+ def self.is_supported?(platform)
46
+ platform == :ios
47
+ end
48
+
45
49
  def self.run(params)
46
50
  unless Helper.test?
47
51
  raise "xcodebuild not installed".red if `which xcodebuild`.length == 0
@@ -254,6 +258,10 @@ module Fastlane
254
258
  def self.author
255
259
  "dtrenz"
256
260
  end
261
+
262
+ def self.is_supported?(platform)
263
+ platform == :ios
264
+ end
257
265
  end
258
266
 
259
267
  class XcbuildAction < Action
@@ -270,6 +278,10 @@ module Fastlane
270
278
  def self.author
271
279
  "dtrenz"
272
280
  end
281
+
282
+ def self.is_supported?(platform)
283
+ platform == :ios
284
+ end
273
285
  end
274
286
 
275
287
  class XccleanAction < Action
@@ -286,6 +298,10 @@ module Fastlane
286
298
  def self.author
287
299
  "dtrenz"
288
300
  end
301
+
302
+ def self.is_supported?(platform)
303
+ platform == :ios
304
+ end
289
305
  end
290
306
 
291
307
  class XcexportAction < Action
@@ -302,6 +318,10 @@ module Fastlane
302
318
  def self.author
303
319
  "dtrenz"
304
320
  end
321
+
322
+ def self.is_supported?(platform)
323
+ platform == :ios
324
+ end
305
325
  end
306
326
 
307
327
  class XctestAction < Action
@@ -321,6 +341,10 @@ module Fastlane
321
341
  ]
322
342
  end
323
343
 
344
+ def self.is_supported?(platform)
345
+ platform == :ios
346
+ end
347
+
324
348
  def self.author
325
349
  "dtrenz"
326
350
  end