fastlane 1.80.0 → 1.81.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: 4652b394eca1184673a3cb3615ab2099860ec280
4
- data.tar.gz: 38e7f1b85fef9e01902f73107febba75e6821eaf
3
+ metadata.gz: ce27a7eea1711d18517af6a465e48f9551cd68c6
4
+ data.tar.gz: f254ce5d163818c4587d04ca6edd71c131ac11a9
5
5
  SHA512:
6
- metadata.gz: 6a46d915f83ed3f28c11f1e59d82c70d6b675044ee4bf9e91d12307663482fa7034d4e298b03a939ed9f5b8c1a55cd952c93d5dd57b4e7c9410f7c3dc4ca633c
7
- data.tar.gz: 6307693b4b2ea4f225269491e216df7d42fdd90c78089b74b3422cea4e910a2fc4d8abe8598bd86f672b2fe0d6b7636d1da8f23485dd69d9cf738999c8c3d8e0
6
+ metadata.gz: 1a7cfa1bf3dc1f17ffac8c53bbbe6b8ee2028d7908c9ba0ac974799736103e1e963944f0e7b0f87282c3dde7fe10e7ecdccdd71d265773edf7291e7ef9c9cba9
7
+ data.tar.gz: 152866a9bfa4cdcf5cd00eabf387bf46d6e75e81d1c458361cedb25ae2ea4cf277ec363488b3b2cfe530050d4b29facaba634c647e8c2f5f6f8b294dd2e6d2a3
@@ -153,6 +153,16 @@ class FastlaneApplication
153
153
  end
154
154
  end
155
155
 
156
+ command :enable_auto_complete do |c|
157
+ c.syntax = 'fastlane enable_auto_complete'
158
+ c.description = 'Enable tab auto completion'
159
+
160
+ c.action do |args, options|
161
+ require 'fastlane/auto_complete'
162
+ Fastlane::AutoComplete.execute
163
+ end
164
+ end
165
+
156
166
  default_command :trigger
157
167
 
158
168
  run!
@@ -0,0 +1,19 @@
1
+ _fastlane_complete() {
2
+ COMPREPLY=()
3
+ local word="${COMP_WORDS[COMP_CWORD]}"
4
+ local completions=""
5
+
6
+ # look for Fastfile either in this directory or fastlane/ then grab the lane names
7
+ if [[ -e "Fastfile" ]]; then
8
+ file="Fastfile"
9
+ elif [[ -e "fastlane/Fastfile" ]]; then
10
+ file="fastlane/Fastfile"
11
+ fi
12
+
13
+ # parse 'beta' out of 'lane :beta do', etc
14
+ completions=`cat $file | grep "^\s*lane \:" | awk -F ':' '{print $2}' | awk -F ' ' '{print $1}'`
15
+
16
+ COMPREPLY=( $(compgen -W "$completions" -- "$word") )
17
+ }
18
+
19
+ complete -F _fastlane_complete fastlane
@@ -0,0 +1,9 @@
1
+ #!/bin/sh
2
+ if [ -n "$BASH_VERSION" ]; then
3
+ source ~/.fastlane/completions/completion.bash
4
+
5
+ elif [ -n "$ZSH_VERSION" ]; then
6
+ source ~/.fastlane/completions/completion.zsh
7
+ fi
8
+
9
+ # Do not remove v0.0.1
@@ -0,0 +1,18 @@
1
+ _fastlane_complete() {
2
+ local word completions
3
+ word="$1"
4
+
5
+ # look for Fastfile either in this directory or fastlane/ then grab the lane names
6
+ if [[ -e "Fastfile" ]] then
7
+ file="Fastfile"
8
+ elif [[ -e "fastlane/Fastfile" ]] then
9
+ file="fastlane/Fastfile"
10
+ fi
11
+
12
+ # parse 'beta' out of 'lane :beta do', etc
13
+ completions=`cat $file | grep "^\s*lane \:" | awk -F ':' '{print $2}' | awk -F ' ' '{print $1}'`
14
+
15
+ reply=( "${(ps:\n:)completions}" )
16
+ }
17
+
18
+ compctl -K _fastlane_complete fastlane
@@ -55,6 +55,10 @@ module Fastlane
55
55
  end
56
56
  end
57
57
  end
58
+
59
+ if (Actions.lane_context[SharedValues::DSYM_PATHS] || []).count == 0
60
+ UI.error("No dSYM files found on iTunes Connect - this usually happens when no recompling happened yet")
61
+ end
58
62
  end
59
63
 
60
64
  def self.download(url)
@@ -19,18 +19,41 @@ module Fastlane
19
19
  command_prefix,
20
20
  'agvtool',
21
21
  'what-marketing-version',
22
- '-terse1'
22
+ '-terse'
23
23
  ].join(' ')
24
24
 
25
+ line = ""
26
+ scheme = params[:scheme] || ""
27
+ results = []
28
+
25
29
  if Helper.test?
26
- Actions.lane_context[SharedValues::VERSION_NUMBER] = command
30
+ results = [
31
+ '"SampleProject.xcodeproj/../SchemeA/SchemeA-Info.plist"=4.3.2',
32
+ '"SampleProject.xcodeproj/../SchemeATests/Info.plist"=4.3.2',
33
+ '"SampleProject.xcodeproj/../SchemeB/SchemeB-Info.plist"=5.4.3',
34
+ '"SampleProject.xcodeproj/../SchemeBTests/Info.plist"=5.4.3'
35
+ ]
27
36
  else
37
+ results = (Actions.sh command).split("\n")
38
+ end
28
39
 
29
- version_number = (Actions.sh command).split("\n").last
30
-
31
- # Store the number in the shared hash
32
- Actions.lane_context[SharedValues::VERSION_NUMBER] = version_number
40
+ if scheme.empty?
41
+ line = results.first unless results.first.nil?
42
+ else
43
+ scheme_string = "/#{scheme}/"
44
+ results.any? do |result|
45
+ if result.include? scheme_string
46
+ line = result
47
+ break
48
+ end
49
+ end
33
50
  end
51
+
52
+ version_number = line.partition('=').last
53
+ return version_number if Helper.is_test?
54
+
55
+ # Store the number in the shared hash
56
+ Actions.lane_context[SharedValues::VERSION_NUMBER] = version_number
34
57
  rescue => ex
35
58
  UI.error('Make sure to follow the steps to setup your Xcode project: https://developer.apple.com/library/ios/qa/qa1827/_index.html')
36
59
  raise ex
@@ -61,7 +84,11 @@ module Fastlane
61
84
  verify_block: proc do |value|
62
85
  UI.user_error!("Please pass the path to the project, not the workspace") if value.end_with? ".xcworkspace"
63
86
  UI.user_error!("Could not find Xcode project at path '#{File.expand_path(value)}'") if !File.exist?(value) and !Helper.is_test?
64
- end)
87
+ end),
88
+ FastlaneCore::ConfigItem.new(key: :scheme,
89
+ env_name: "FL_VERSION_NUMBER_SCHEME",
90
+ description: "Specify a specific scheme if you have multiple per project, optional",
91
+ optional: true)
65
92
  ]
66
93
  end
67
94
 
@@ -43,6 +43,7 @@ module Fastlane
43
43
  params[:html_file_name] = config[:html_file_name]
44
44
  params[:version_template_path] = config[:version_template_path]
45
45
  params[:version_file_name] = config[:version_file_name]
46
+ params [:acl] = config[:acl]
46
47
 
47
48
  # Pulling parameters for other uses
48
49
  s3_region = params[:region]
@@ -53,6 +54,7 @@ module Fastlane
53
54
  ipa_file = params[:ipa]
54
55
  dsym_file = params[:dsym]
55
56
  s3_path = params[:path]
57
+ acl = params[:acl].to_sym
56
58
 
57
59
  UI.user_error!("No S3 access key given, pass using `access_key: 'key'`") unless s3_access_key.to_s.length > 0
58
60
  UI.user_error!("No S3 secret access key given, pass using `secret_access_key: 'secret key'`") unless s3_secret_access_key.to_s.length > 0
@@ -74,7 +76,7 @@ module Fastlane
74
76
  ipa_file_name = "#{url_part}#{ipa_file_basename}"
75
77
  ipa_file_data = File.open(ipa_file, 'rb')
76
78
 
77
- ipa_url = self.upload_file(bucket, ipa_file_name, ipa_file_data)
79
+ ipa_url = self.upload_file(bucket, ipa_file_name, ipa_file_data, acl)
78
80
 
79
81
  # Setting action and environment variables
80
82
  Actions.lane_context[SharedValues::S3_IPA_OUTPUT_PATH] = ipa_url
@@ -85,7 +87,7 @@ module Fastlane
85
87
  dsym_file_name = "#{url_part}#{dsym_file_basename}"
86
88
  dsym_file_data = File.open(dsym_file, 'rb')
87
89
 
88
- dsym_url = self.upload_file(bucket, dsym_file_name, dsym_file_data)
90
+ dsym_url = self.upload_file(bucket, dsym_file_name, dsym_file_data, acl)
89
91
 
90
92
  # Setting action and environment variables
91
93
  Actions.lane_context[SharedValues::S3_DSYM_OUTPUT_PATH] = dsym_url
@@ -175,9 +177,9 @@ module Fastlane
175
177
  #
176
178
  #####################################
177
179
 
178
- plist_url = self.upload_file(bucket, plist_file_name, plist_render)
179
- html_url = self.upload_file(bucket, html_file_name, html_render)
180
- version_url = self.upload_file(bucket, version_file_name, version_render)
180
+ plist_url = self.upload_file(bucket, plist_file_name, plist_render, acl)
181
+ html_url = self.upload_file(bucket, html_file_name, html_render, acl)
182
+ version_url = self.upload_file(bucket, version_file_name, version_render, acl)
181
183
 
182
184
  # Setting action and environment variables
183
185
  Actions.lane_context[SharedValues::S3_PLIST_OUTPUT_PATH] = plist_url
@@ -212,8 +214,8 @@ module Fastlane
212
214
  s3_client
213
215
  end
214
216
 
215
- def self.upload_file(bucket, file_name, file_data)
216
- obj = bucket.objects.create(file_name, file_data, acl: :public_read)
217
+ def self.upload_file(bucket, file_name, file_data, acl)
218
+ obj = bucket.objects.create(file_name, file_data, acl: acl)
217
219
 
218
220
  # When you enable versioning on a S3 bucket,
219
221
  # writing to an object will create an object version
@@ -324,7 +326,9 @@ module Fastlane
324
326
  FastlaneCore::ConfigItem.new(key: :acl,
325
327
  env_name: "S3_ACL",
326
328
  description: "Uploaded object permissions e.g public_read (default), private, public_read_write, authenticated_read ",
327
- optional: true)
329
+ optional: true,
330
+ default_value: "public_read"
331
+ )
328
332
  ]
329
333
  end
330
334
 
@@ -34,6 +34,7 @@ module Fastlane
34
34
  FastlaneCore::ConfigItem.new(key: :value,
35
35
  env_name: "FL_SET_INFO_PLIST_PARAM_VALUE",
36
36
  description: "Value to setup",
37
+ is_string: false,
37
38
  optional: false),
38
39
  FastlaneCore::ConfigItem.new(key: :path,
39
40
  env_name: "FL_SET_INFO_PLIST_PATH",
@@ -74,7 +74,7 @@ module Fastlane
74
74
  def self.details
75
75
  return <<-eos
76
76
  Slather works with multiple code coverage formats including Xcode7 code coverage.
77
- Slather is available at https://github.com/venmo/slather
77
+ Slather is available at https://github.com/SlatherOrg/slather
78
78
  eos
79
79
  end
80
80
 
@@ -27,7 +27,11 @@ module Fastlane
27
27
 
28
28
  command << " > #{params[:output_file].shellescape}" if params[:output_file]
29
29
 
30
- Actions.sh(command)
30
+ begin
31
+ Actions.sh(command)
32
+ rescue
33
+ handle_swiftlint_error(params[:ignore_exit_status], $?.exitstatus)
34
+ end
31
35
  end
32
36
 
33
37
  #####################################################
@@ -62,6 +66,12 @@ module Fastlane
62
66
  FastlaneCore::ConfigItem.new(key: :files,
63
67
  description: 'List of files to process',
64
68
  is_string: false,
69
+ optional: true),
70
+ FastlaneCore::ConfigItem.new(key: :ignore_exit_status,
71
+ description: "Ignore the exit status of the SwiftLint command, so that serious violations \
72
+ don't fail the build (true/false)",
73
+ default_value: false,
74
+ is_string: false,
65
75
  optional: true)
66
76
  ]
67
77
  end
@@ -79,6 +89,22 @@ module Fastlane
79
89
  def self.is_supported?(platform)
80
90
  [:ios, :mac].include?(platform)
81
91
  end
92
+
93
+ def self.handle_swiftlint_error(ignore_exit_status, exit_status)
94
+ if ignore_exit_status
95
+ failure_suffix = 'which would normally fail the build.'
96
+ secondary_message = 'fastlane will continue because the `ignore_exit_status` option was used! 🙈'
97
+ else
98
+ failure_suffix = 'which represents a failure.'
99
+ secondary_message = 'If you want fastlane to continue anyway, use the `ignore_exit_status` option. 🙈'
100
+ end
101
+
102
+ UI.important("")
103
+ UI.important("SwiftLint finished with exit code #{exit_status}, #{failure_suffix}")
104
+ UI.important(secondary_message)
105
+ UI.important("")
106
+ UI.user_error!("SwiftLint finished with errors (exit code: #{exit_status})") unless ignore_exit_status
107
+ end
82
108
  end
83
109
  end
84
110
  end
@@ -8,7 +8,7 @@ module Fastlane
8
8
  find_api_token(params)
9
9
 
10
10
  dsym_paths = []
11
- dsym_paths << params[:dsym_path]
11
+ dsym_paths << params[:dsym_path] if params[:dsym_path]
12
12
  dsym_paths += Actions.lane_context[SharedValues::DSYM_PATHS] if Actions.lane_context[SharedValues::DSYM_PATHS]
13
13
 
14
14
  if dsym_paths.count == 0
@@ -94,7 +94,9 @@ module Fastlane
94
94
  [
95
95
  "This action allows you to upload symbolication files to Crashlytics.",
96
96
  "It's extra useful if you use it to download the latest dSYM files from Apple when you",
97
- "use Bitcode"
97
+ "use Bitcode. This action will not fail the build if one of the uploads failed.",
98
+ "The reason for that is that sometimes some of dSYM files are invalid, and we don't want",
99
+ "them to fail the complete build."
98
100
  ].join(" ")
99
101
  end
100
102
 
@@ -162,7 +162,7 @@ module Fastlane
162
162
 
163
163
  case output_style
164
164
  when :standard
165
- xcpretty_args << '--color'
165
+ xcpretty_args << '--color' unless Helper.colors_disabled?
166
166
  when :basic
167
167
  xcpretty_args << '--no-utf'
168
168
  end
@@ -0,0 +1,24 @@
1
+ require 'fileutils'
2
+
3
+ module Fastlane
4
+ # Enable tab auto completion
5
+ class AutoComplete
6
+ def self.execute
7
+ fastlane_conf_dir = "~/.fastlane"
8
+ confirm = UI.confirm "This will copy a shell script into #{fastlane_conf_dir} that provides the command tab completion. Sound good?"
9
+ return unless confirm
10
+
11
+ # create the ~/.fastlane directory
12
+ fastlane_conf_dir = File.expand_path fastlane_conf_dir
13
+ FileUtils.mkdir_p fastlane_conf_dir
14
+
15
+ # then copy all of the completions files into it from the gem
16
+ completion_script_path = File.join(Fastlane::Helper.gem_path('fastlane'), 'lib', 'assets', 'completions')
17
+ FileUtils.cp_r completion_script_path, fastlane_conf_dir
18
+
19
+ UI.success "Copied! To use auto complete for fastlane, add the following line to your favorite rc file (e.g. ~/.bashrc)"
20
+ UI.important " . ~/.fastlane/completions/completion.sh"
21
+ UI.success "Don't forget to source that file in your current shell! 🐚"
22
+ end
23
+ end
24
+ end
@@ -15,6 +15,9 @@ module Fastlane
15
15
  # Path to the gradle script
16
16
  attr_accessor :gradle_path
17
17
 
18
+ # Read-only path to the shell-escaped gradle script, suitable for use in shell commands
19
+ attr_reader :escaped_gradle_path
20
+
18
21
  # All the available tasks
19
22
  attr_accessor :tasks
20
23
 
@@ -25,7 +28,7 @@ module Fastlane
25
28
  # Run a certain action
26
29
  def trigger(task: nil, flags: nil, serial: nil)
27
30
  android_serial = (serial != "") ? "ANDROID_SERIAL=#{serial}" : nil
28
- command = [android_serial, gradle_path, task, flags].reject(&:nil?).join(" ")
31
+ command = [android_serial, escaped_gradle_path, task, flags].compact.join(" ")
29
32
  Action.sh(command)
30
33
  end
31
34
 
@@ -34,12 +37,17 @@ module Fastlane
34
37
  return tasks.collect(&:title).include?(task)
35
38
  end
36
39
 
40
+ def gradle_path=(gradle_path)
41
+ @gradle_path = gradle_path
42
+ @escaped_gradle_path = gradle_path.shellescape
43
+ end
44
+
37
45
  private
38
46
 
39
47
  def load_all_tasks
40
48
  self.tasks = []
41
49
 
42
- command = [gradle_path, "tasks", "--console=plain"].join(" ")
50
+ command = [escaped_gradle_path, "tasks", "--console=plain"].join(" ")
43
51
  output = Actions.sh(command, log: false)
44
52
  output.split("\n").each do |line|
45
53
  if (result = line.match(/(\w+)\s\-\s([\w\s]+)/))
@@ -103,30 +103,45 @@ module Fastlane
103
103
  # Lane chooser if user didn't provide a lane
104
104
  # @param platform: is probably nil, but user might have called `fastlane android`, and only wants to list those actions
105
105
  def self.choose_lane(ff, platform)
106
- loop do
107
- UI.error "You must provide a lane to drive. Available lanes:"
108
- available = ff.runner.available_lanes(platform)
106
+ available = ff.runner.lanes[platform].to_a
107
+ if available.empty?
108
+ UI.user_error! "It looks like you don't have any lanes to run just yet. Check out how to get started here: https://github.com/fastlane/fastlane 🚀"
109
+ end
109
110
 
110
- available.each_with_index do |lane, index|
111
- UI.message "#{index + 1}) #{lane}"
112
- end
111
+ rows = []
112
+ available.each_with_index do |lane, index|
113
+ rows << [index + 1, lane.last.pretty_name, lane.last.description.first]
114
+ end
113
115
 
114
- i = $stdin.gets.strip.to_i - 1
115
- if i >= 0 and available[i]
116
- selection = available[i]
117
- UI.important "Driving the lane #{selection}. Next time launch fastlane using `fastlane #{selection}`"
118
- platform = selection.split(' ')[0]
119
- lane_name = selection.split(' ')[1]
116
+ rows << [0, "cancel", "No selection, exit fastlane!"]
120
117
 
121
- unless lane_name # no specific platform, just a root lane
122
- lane_name = platform
123
- platform = nil
124
- end
118
+ table = Terminal::Table.new(
119
+ title: "Available lanes to run",
120
+ headings: ['Number', 'Lane Name', 'Description'],
121
+ rows: rows
122
+ )
125
123
 
126
- return platform, lane_name # yeah
124
+ UI.message "Welcome to fastlane! Here's what your app is setup to do:"
125
+
126
+ puts table
127
+
128
+ i = UI.input "Which number would you like run?"
129
+
130
+ i = i.to_i - 1
131
+ if i >= 0 && available[i]
132
+ selection = available[i].last.pretty_name
133
+ UI.important "Running lane `#{selection}`. Next time you can do this by directly typing `fastlane #{selection}` 🚀."
134
+ platform = selection.split(' ')[0]
135
+ lane_name = selection.split(' ')[1]
136
+
137
+ unless lane_name # no specific platform, just a root lane
138
+ lane_name = platform
139
+ platform = nil
127
140
  end
128
141
 
129
- UI.error "Invalid input. Please enter the number of the lane you want to use"
142
+ return platform, lane_name # yeah
143
+ else
144
+ UI.user_error! "Run `fastlane` the next time you need to build, test or release your app 🚀"
130
145
  end
131
146
  end
132
147
 
@@ -1,3 +1,3 @@
1
1
  module Fastlane
2
- VERSION = '1.80.0'.freeze
2
+ VERSION = '1.81.0'.freeze
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.80.0
4
+ version: 1.81.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: 2016-04-05 00:00:00.000000000 Z
11
+ date: 2016-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: krausefx-shenzhen
@@ -120,14 +120,14 @@ dependencies:
120
120
  requirements:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: 2.3.8
123
+ version: '2.3'
124
124
  type: :runtime
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: 2.3.8
130
+ version: '2.3'
131
131
  - !ruby/object:Gem::Dependency
132
132
  name: multipart-post
133
133
  requirement: !ruby/object:Gem::Requirement
@@ -188,7 +188,7 @@ dependencies:
188
188
  requirements:
189
189
  - - ">="
190
190
  - !ruby/object:Gem::Version
191
- version: 0.24.1
191
+ version: 0.25.1
192
192
  - - "<"
193
193
  - !ruby/object:Gem::Version
194
194
  version: 1.0.0
@@ -198,7 +198,7 @@ dependencies:
198
198
  requirements:
199
199
  - - ">="
200
200
  - !ruby/object:Gem::Version
201
- version: 0.24.1
201
+ version: 0.25.1
202
202
  - - "<"
203
203
  - !ruby/object:Gem::Version
204
204
  version: 1.0.0
@@ -448,7 +448,7 @@ dependencies:
448
448
  requirements:
449
449
  - - ">="
450
450
  - !ruby/object:Gem::Version
451
- version: 0.3.1
451
+ version: 0.3.2
452
452
  - - "<"
453
453
  - !ruby/object:Gem::Version
454
454
  version: 1.0.0
@@ -458,7 +458,7 @@ dependencies:
458
458
  requirements:
459
459
  - - ">="
460
460
  - !ruby/object:Gem::Version
461
- version: 0.3.1
461
+ version: 0.3.2
462
462
  - - "<"
463
463
  - !ruby/object:Gem::Version
464
464
  version: 1.0.0
@@ -659,6 +659,9 @@ files:
659
659
  - lib/assets/AppfileTemplateAndroid
660
660
  - lib/assets/DefaultFastfileTemplate
661
661
  - lib/assets/FastfileTemplateAndroid
662
+ - lib/assets/completions/completion.bash
663
+ - lib/assets/completions/completion.sh
664
+ - lib/assets/completions/completion.zsh
662
665
  - lib/assets/custom_action_template.rb
663
666
  - lib/assets/mailgun_html_template.erb
664
667
  - lib/assets/report_template.xml.erb
@@ -831,6 +834,7 @@ files:
831
834
  - lib/fastlane/actions/xcov.rb
832
835
  - lib/fastlane/actions/xctool.rb
833
836
  - lib/fastlane/actions/zip.rb
837
+ - lib/fastlane/auto_complete.rb
834
838
  - lib/fastlane/command_line_handler.rb
835
839
  - lib/fastlane/configuration_helper.rb
836
840
  - lib/fastlane/core_ext/bundler_monkey_patch.rb
@@ -880,7 +884,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
880
884
  version: '0'
881
885
  requirements: []
882
886
  rubyforge_project:
883
- rubygems_version: 2.4.8
887
+ rubygems_version: 2.2.2
884
888
  signing_key:
885
889
  specification_version: 4
886
890
  summary: Connect all iOS deployment tools into one streamlined workflow