fastlane 2.2.0 → 2.3.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: 3f33587942312c51aef121133e597d5aab60056b
4
- data.tar.gz: 642bf6bd44765a002f62977bc3c81b18f4772784
3
+ metadata.gz: 17ff4ad445269f4de13b6417670f5ecea7e0a73b
4
+ data.tar.gz: 225d33ffac4954be128f0ed45c57bf60460b613f
5
5
  SHA512:
6
- metadata.gz: 5c5c3d1b84d4bd9914877a3d672b431253931f16346c77495f9ccc0c33e3d55442e87df3643624f05f81eb883d7ea39d03628e30dbe67add0aebd8ede5d87fe8
7
- data.tar.gz: 4603c27be02b10644fcadcdb31ae3e52f61ca5989436d7420aa86abd6e9f2654c3871d3811917a2f0858e31a35a01a9ef8ba6c770b6a5a58a6bf9a5b4e6bc808
6
+ metadata.gz: c7a0e0c455834201b789ee34acac0e0e6fdc142e2d3b5885ab07fa64a1d7369139a7ca516a0d70cadd83e2e5eca07f5af27803a12b89464e4bec35e186f3feec
7
+ data.tar.gz: b5c7390d7e602f8306f0e37cea52c77f9a23b81224ee983e74386107f03f373aca845efeeec0659ea8f91934eae56254d51b8aa73f3f460f94ad09ec6626c466
data/README.md CHANGED
@@ -43,7 +43,7 @@ Then to deploy a new 'beta' version of your app just run
43
43
  :rocket: | Saves you **hours** for every app update you release
44
44
  :pencil2: | Flexible configuration using a fully customisable `Fastfile`
45
45
  :mountain_cableway: | Implement a fully working Continuous Delivery process
46
- :ghost: | [Jenkins Integration](https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Jenkins.md): Show output directly in test results
46
+ :ghost: | [Jenkins Integration](https://docs.fastlane.tools/best-practices/continuous-integration/#jenkins-integration): Show output directly in test results
47
47
  :book: | Automatically generate Markdown documentation of your lane configurations
48
48
  :hatching_chick: | Over 170 built-in integrations available
49
49
  :computer: | Support for iOS, Mac, and Android apps
@@ -10,14 +10,14 @@ Along with the [Ruby libraries](https://github.com/fastlane/fastlane/tree/master
10
10
 
11
11
  **Adding Credentials**
12
12
  ```
13
- fastlane-credentials add --username felix@krausefx.com
13
+ fastlane fastlane-credentials add --username felix@krausefx.com
14
14
  Password: *********
15
15
  Credential felix@krausefx.com:********* added to keychain.
16
16
  ```
17
17
 
18
18
  **Removing Credentials**
19
19
  ```
20
- fastlane-credentials remove --username felix@krausefx.com
20
+ fastlane fastlane-credentials remove --username felix@krausefx.com
21
21
  password has been deleted.
22
22
  ```
23
23
 
@@ -24,6 +24,11 @@ module Deliver
24
24
  env_name: "DELIVER_APP_ID",
25
25
  description: "The app ID of the app you want to use/modify",
26
26
  is_string: false), # don't add any verification here, as it's used to store a spaceship ref
27
+ FastlaneCore::ConfigItem.new(key: :edit_live,
28
+ short_option: "-o",
29
+ env_name: "DELIVER_EDIT_LIVE",
30
+ description: "Modify live metadata, this option disables ipa upload and screenshot upload",
31
+ is_string: false),
27
32
  FastlaneCore::ConfigItem.new(key: :ipa,
28
33
  short_option: "-i",
29
34
  optional: true,
@@ -1,6 +1,7 @@
1
1
  module Deliver
2
2
  class UploadAssets
3
3
  def upload(options)
4
+ return if options[:edit_live]
4
5
  app = options[:app]
5
6
 
6
7
  v = app.edit_version(platform: options[:platform])
@@ -15,17 +15,35 @@ module Deliver
15
15
  :primary_first_sub_category, :primary_second_sub_category,
16
16
  :secondary_first_sub_category, :secondary_second_sub_category]
17
17
 
18
+ # Localized app details values, that are editable in live state
19
+ LOCALISED_LIVE_VALUES = [:description, :release_notes, :support_url, :marketing_url]
20
+
21
+ # Non localized app details values, that are editable in live state
22
+ NON_LOCALISED_LIVE_VALUES = [:privacy_url]
23
+
18
24
  # Make sure to call `load_from_filesystem` before calling upload
19
25
  def upload(options)
20
26
  return if options[:skip_metadata]
21
- verify_available_languages!(options)
27
+ # it is not possible to create new languages, because
28
+ # :keywords is not write-able on published versions
29
+ # therefore skip it.
30
+ verify_available_languages!(options) unless options[:edit_live]
22
31
 
23
32
  app = options[:app]
24
33
 
25
34
  details = app.details
26
- v = app.edit_version(platform: options[:platform])
35
+ if options[:edit_live]
36
+ # not all values are editable when using live_version
37
+ v = app.live_version(platform: options[:platform])
38
+ localised_options = LOCALISED_LIVE_VALUES
39
+ non_localised_options = NON_LOCALISED_LIVE_VALUES
40
+ else
41
+ v = app.edit_version(platform: options[:platform])
42
+ localised_options = (LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES)
43
+ non_localised_options = (NON_LOCALISED_VERSION_VALUES + NON_LOCALISED_APP_VALUES)
44
+ end
27
45
 
28
- (LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES).each do |key|
46
+ localised_options.each do |key|
29
47
  current = options[key]
30
48
  next unless current
31
49
 
@@ -42,7 +60,7 @@ module Deliver
42
60
  end
43
61
  end
44
62
 
45
- (NON_LOCALISED_VERSION_VALUES + NON_LOCALISED_APP_VALUES).each do |key|
63
+ non_localised_options.each do |key|
46
64
  current = options[key].to_s.strip
47
65
  next unless current.to_s.length > 0
48
66
  v.send("#{key}=", current) if NON_LOCALISED_VERSION_VALUES.include?(key)
@@ -57,7 +75,7 @@ module Deliver
57
75
  UI.message("Uploading metadata to iTunes Connect")
58
76
  v.save!
59
77
  details.save!
60
- UI.success("Successfully uploaded initial set of metadata to iTunes Connect")
78
+ UI.success("Successfully uploaded set of metadata to iTunes Connect")
61
79
  end
62
80
 
63
81
  # If the user is using the 'default' language, then assign values where they are needed
@@ -3,6 +3,7 @@ module Deliver
3
3
  class UploadScreenshots
4
4
  def upload(options, screenshots)
5
5
  return if options[:skip_screenshots]
6
+ return if options[:edit_live]
6
7
 
7
8
  app = options[:app]
8
9
 
@@ -86,7 +86,7 @@ fastlane release
86
86
  :rocket: | Saves you **hours** for every app update you release
87
87
  :pencil2: | Very flexible configuration using a fully customisable `Fastfile`
88
88
  :mountain_cableway: | Implement a fully working Continuous Delivery process
89
- :ghost: | [Jenkins Integration](https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Jenkins.md): Show the output directly in the Jenkins test results
89
+ :ghost: | [Jenkins Integration](https://docs.fastlane.tools/best-practices/continuous-integration/#jenkins-integration): Show the output directly in the Jenkins test results
90
90
  :book: | Automatically generate a markdown documentation of your lane config
91
91
  :hatching_chick: | Over 170 built-in integrations available
92
92
  :computer: | Support for both iOS, Mac OS and Android apps
Binary file
@@ -3,7 +3,6 @@ module Fastlane
3
3
  class BadgeAction < Action
4
4
  def self.run(params)
5
5
  Actions.verify_gem!('badge')
6
- check_imagemagick!
7
6
  require 'badge'
8
7
  options = {
9
8
  dark: params[:dark],
@@ -141,20 +140,6 @@ module Fastlane
141
140
  def self.is_supported?(platform)
142
141
  [:ios, :mac, :android].include?(platform)
143
142
  end
144
-
145
- def self.check_imagemagick!
146
- return if `which convert`.include?('convert')
147
-
148
- UI.error("You have to install ImageMagick to use `badge`")
149
- UI.error("")
150
- UI.error("Install it using:")
151
- UI.command("brew update && brew install imagemagick")
152
- UI.error("")
153
- UI.error("If you don't have homebrew, visit http://brew.sh")
154
-
155
- UI.user_error!("Install ImageMagick and start your lane again!")
156
- end
157
- private_class_method :check_imagemagick!
158
143
  end
159
144
  end
160
145
  end
@@ -67,6 +67,14 @@ module Fastlane
67
67
  expected_changed_files = []
68
68
  expected_changed_files << pbxproj_path
69
69
  expected_changed_files << info_plist_files
70
+
71
+ if params[:settings]
72
+ settings_plists_from_param(params[:settings]).each do |file|
73
+ settings_file_pathname = Pathname.new settings_bundle_file_path(project, file)
74
+ expected_changed_files << settings_file_pathname.relative_path_from(repo_pathname).to_s
75
+ end
76
+ end
77
+
70
78
  expected_changed_files.flatten!.uniq!
71
79
 
72
80
  # get the list of files that have actually changed in our git workdir
@@ -91,10 +99,6 @@ module Fastlane
91
99
  end
92
100
  end
93
101
 
94
- if params[:settings]
95
- expected_changed_files << 'Settings.bundle/Root.plist'
96
- end
97
-
98
102
  # get the absolute paths to the files
99
103
  git_add_paths = expected_changed_files.map do |path|
100
104
  updated = path.gsub("$(SRCROOT)", ".").gsub("${SRCROOT}", ".")
@@ -193,6 +197,29 @@ module Fastlane
193
197
  def self.category
194
198
  :source_control
195
199
  end
200
+
201
+ class << self
202
+ def settings_plists_from_param(param)
203
+ if param.kind_of? String
204
+ # commit_version_bump xcodeproj: "MyProject.xcodeproj", settings: "About.plist"
205
+ return [param]
206
+ elsif param.kind_of? Array
207
+ # commit_version_bump xcodeproj: "MyProject.xcodeproj", settings: [ "Root.plist", "About.plist" ]
208
+ return param
209
+ end
210
+
211
+ # commit_version_bump xcodeproj: "MyProject.xcodeproj", settings: true # Root.plist
212
+ ["Root.plist"]
213
+ end
214
+
215
+ def settings_bundle_file_path(project, settings_file_name)
216
+ settings_bundle = project.files.find { |f| f.path =~ /Settings.bundle/ }
217
+ raise "No Settings.bundle in project" if settings_bundle.nil?
218
+
219
+ project_parent = File.dirname project.path
220
+ File.join(project_parent, settings_bundle.path, settings_file_name)
221
+ end
222
+ end
196
223
  end
197
224
  end
198
225
  end
@@ -5,7 +5,7 @@ module Fastlane
5
5
  # Does a hard reset and clean on the repo
6
6
  class ResetGitRepoAction < Action
7
7
  def self.run(params)
8
- if params[:force] || params[:force] || Actions.lane_context[SharedValues::GIT_REPO_WAS_CLEAN_ON_START]
8
+ if params[:force] || Actions.lane_context[SharedValues::GIT_REPO_WAS_CLEAN_ON_START]
9
9
  paths = params[:files]
10
10
 
11
11
  return paths if Helper.is_test?
@@ -143,7 +143,7 @@ module Fastlane
143
143
 
144
144
  # Is used to look if the method is implemented as an action
145
145
  def method_missing(method_sym, *arguments, &_block)
146
- self.runner.trigger_action_by_name(method_sym, nil, *arguments)
146
+ self.runner.trigger_action_by_name(method_sym, nil, false, *arguments)
147
147
  end
148
148
 
149
149
  #####################################################
@@ -227,35 +227,30 @@ module Fastlane
227
227
  # Checkout the repo
228
228
  repo_name = url.split("/").last
229
229
 
230
- tmp_path = Dir.mktmpdir("fl_clone")
231
- clone_folder = File.join(tmp_path, repo_name)
230
+ Dir.mktmpdir("fl_clone") do |tmp_path|
231
+ clone_folder = File.join(tmp_path, repo_name)
232
232
 
233
- branch_option = ""
234
- branch_option = "--branch #{branch}" if branch != 'HEAD'
233
+ branch_option = ""
234
+ branch_option = "--branch #{branch}" if branch != 'HEAD'
235
235
 
236
- clone_command = "GIT_TERMINAL_PROMPT=0 git clone '#{url}' '#{clone_folder}' --depth 1 -n #{branch_option}"
236
+ clone_command = "GIT_TERMINAL_PROMPT=0 git clone '#{url}' '#{clone_folder}' --depth 1 -n #{branch_option}"
237
237
 
238
- UI.message "Cloning remote git repo..."
239
- Actions.sh(clone_command)
238
+ UI.message "Cloning remote git repo..."
239
+ Actions.sh(clone_command)
240
240
 
241
- Actions.sh("cd '#{clone_folder}' && git checkout #{branch} '#{path}'")
241
+ Actions.sh("cd '#{clone_folder}' && git checkout #{branch} '#{path}'")
242
242
 
243
- # We also want to check out all the local actions of this fastlane setup
244
- containing = path.split(File::SEPARATOR)[0..-2]
245
- containing = "." if containing.count == 0
246
- actions_folder = File.join(containing, "actions")
247
- begin
248
- Actions.sh("cd '#{clone_folder}' && git checkout #{branch} '#{actions_folder}'")
249
- rescue
250
- # We don't care about a failure here, as local actions are optional
251
- end
252
-
253
- import(File.join(clone_folder, path))
243
+ # We also want to check out all the local actions of this fastlane setup
244
+ containing = path.split(File::SEPARATOR)[0..-2]
245
+ containing = "." if containing.count == 0
246
+ actions_folder = File.join(containing, "actions")
247
+ begin
248
+ Actions.sh("cd '#{clone_folder}' && git checkout #{branch} '#{actions_folder}'")
249
+ rescue
250
+ # We don't care about a failure here, as local actions are optional
251
+ end
254
252
 
255
- if Dir.exist?(clone_folder)
256
- # We want to re-clone if the folder already exists
257
- UI.message "Clearing the git repo..."
258
- Actions.sh("rm -rf '#{tmp_path}'")
253
+ import(File.join(clone_folder, path))
259
254
  end
260
255
  end
261
256
  end
@@ -22,6 +22,7 @@ module Fastlane
22
22
 
23
23
  self.runner.trigger_action_by_name(method_sym,
24
24
  "./fastlane",
25
+ true,
25
26
  *arguments)
26
27
  end
27
28
  end
@@ -109,7 +109,9 @@ module Fastlane
109
109
 
110
110
  # This is being called from `method_missing` from the Fastfile
111
111
  # It's also used when an action is called from another action
112
- def trigger_action_by_name(method_sym, custom_dir, *arguments)
112
+ # @param from_action Indicates if this action is being trigged by another action.
113
+ # If so, it won't show up in summary.
114
+ def trigger_action_by_name(method_sym, custom_dir, from_action, *arguments)
113
115
  # First, check if there is a predefined method in the actions folder
114
116
  class_ref = class_reference_from_action_name(method_sym)
115
117
  unless class_ref
@@ -130,7 +132,7 @@ module Fastlane
130
132
  if class_ref
131
133
  if class_ref.respond_to?(:run)
132
134
  # Action is available, now execute it
133
- return self.execute_action(method_sym, class_ref, arguments, custom_dir: custom_dir)
135
+ return self.execute_action(method_sym, class_ref, arguments, custom_dir: custom_dir, from_action: from_action)
134
136
  else
135
137
  UI.user_error!("Action '#{method_sym}' of class '#{class_name}' was found, but has no `run` method.")
136
138
  end
@@ -197,7 +199,7 @@ module Fastlane
197
199
  end
198
200
  end
199
201
 
200
- def execute_action(method_sym, class_ref, arguments, custom_dir: nil)
202
+ def execute_action(method_sym, class_ref, arguments, custom_dir: nil, from_action: false)
201
203
  if custom_dir.nil?
202
204
  custom_dir ||= "." if Helper.test?
203
205
  custom_dir ||= ".."
@@ -209,7 +211,10 @@ module Fastlane
209
211
 
210
212
  begin
211
213
  Dir.chdir(custom_dir) do # go up from the fastlane folder, to the project folder
212
- Actions.execute_action(class_ref.step_text) do
214
+ # If another action is calling this action, we shouldn't show it in the summary
215
+ # (see https://github.com/fastlane/fastlane/issues/4546)
216
+ action_name = from_action ? nil : class_ref.step_text
217
+ Actions.execute_action(action_name) do
213
218
  # arguments is an array by default, containing an hash with the actual parameters
214
219
  # Since we usually just need the passed hash, we'll just use the first object if there is only one
215
220
  if arguments.count == 0
@@ -1,4 +1,4 @@
1
1
  module Fastlane
2
- VERSION = '2.2.0'.freeze
2
+ VERSION = '2.3.0'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  end
@@ -7,7 +7,8 @@ module FastlaneCore
7
7
 
8
8
  $stdout.sync = true
9
9
 
10
- if Helper.is_test?
10
+ if Helper.is_test? && !ENV.key?('DEBUG')
11
+ $stdout.puts "Logging disabled while running tests. Force them by setting the DEBUG environment variable"
11
12
  @log ||= Logger.new(nil) # don't show any logs when running tests
12
13
  else
13
14
  @log ||= Logger.new($stdout)
@@ -29,6 +29,11 @@ module Snapshot
29
29
  UI.user_error!("Project file invalid") unless File.directory?(v)
30
30
  UI.user_error!("Project file is not a project file, must end with .xcodeproj") unless v.include?(".xcodeproj")
31
31
  end),
32
+ FastlaneCore::ConfigItem.new(key: :xcargs,
33
+ short_option: "-X",
34
+ env_name: "SNAPSHOT_XCARGS",
35
+ description: "Pass additional arguments to xcodebuild for the test phase. Be sure to quote the setting names and values e.g. OTHER_LDFLAGS=\"-ObjC -lstdc++\"",
36
+ optional: true),
32
37
  FastlaneCore::ConfigItem.new(key: :devices,
33
38
  description: "A list of devices you want to take the screenshots from",
34
39
  short_option: "-d",
@@ -154,6 +159,10 @@ module Snapshot
154
159
  short_option: "-f",
155
160
  env_name: "SNAPSHOT_DERIVED_DATA_PATH",
156
161
  description: "The directory where build products and other derived data will go",
162
+ optional: true),
163
+ FastlaneCore::ConfigItem.new(key: :test_target_name,
164
+ env_name: "SNAPSHOT_TEST_TARGET_NAME",
165
+ description: "The name of the target you want to test (if you desire to override the Target Application from Xcode)",
157
166
  optional: true)
158
167
  ]
159
168
  end
@@ -35,13 +35,16 @@ module Snapshot
35
35
  options += project_path_array
36
36
  options << "-sdk '#{config[:sdk]}'" if config[:sdk]
37
37
  options << "-derivedDataPath '#{derived_data_path}'"
38
-
38
+ options << config[:xcargs] if config[:xcargs]
39
39
  options
40
40
  end
41
41
 
42
42
  def build_settings
43
+ config = Snapshot.config
44
+
43
45
  build_settings = []
44
46
  build_settings << "FASTLANE_SNAPSHOT=YES"
47
+ build_settings << "TEST_TARGET_NAME='#{config[:test_target_name]}'" if config[:test_target_name]
45
48
 
46
49
  build_settings
47
50
  end
@@ -112,10 +112,10 @@ This requires you to install `pry` using `sudo gem install pry`. `pry` is not in
112
112
 
113
113
  When your Apple account has 2 factor verification enabled, you'll automatically be asked to verify your identity using your phone. The resulting session will be stored in `~/.spaceship/[email]/cookie`. The session should be valid for about one month, however there is no way to test this without actually waiting for over a month.
114
114
 
115
- Since your CI system probably doesn't allow you to input values (like the verification code), you can use `spaceauth`:
115
+ Since your CI system probably doesn't allow you to input values (like the verification code), you can use `fastlane spaceauth`:
116
116
 
117
117
  ```sh
118
- spaceauth -u apple@krausefx.com
118
+ fastlane spaceauth -u apple@krausefx.com
119
119
  ```
120
120
 
121
121
  This will authenticate you and provide a string that can be transferred to your CI system:
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.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2016-12-21 00:00:00.000000000 Z
17
+ date: 2016-12-23 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: slack-notifier
@@ -703,9 +703,7 @@ files:
703
703
  - bin/bin-proxy
704
704
  - bin/fastlane
705
705
  - cert/README.md
706
- - cert/lib/.DS_Store
707
706
  - cert/lib/cert.rb
708
- - cert/lib/cert/.DS_Store
709
707
  - cert/lib/cert/commands_generator.rb
710
708
  - cert/lib/cert/options.rb
711
709
  - cert/lib/cert/runner.rb
@@ -752,8 +750,10 @@ files:
752
750
  - fastlane/lib/assets/s3_plist_template.erb
753
751
  - fastlane/lib/assets/s3_version_template.erb
754
752
  - fastlane/lib/fastlane.rb
753
+ - fastlane/lib/fastlane/.DS_Store
755
754
  - fastlane/lib/fastlane/action.rb
756
755
  - fastlane/lib/fastlane/action_collector.rb
756
+ - fastlane/lib/fastlane/actions/.DS_Store
757
757
  - fastlane/lib/fastlane/actions/README.md
758
758
  - fastlane/lib/fastlane/actions/actions_helper.rb
759
759
  - fastlane/lib/fastlane/actions/adb.rb
@@ -1003,7 +1003,6 @@ files:
1003
1003
  - fastlane/lib/fastlane/tools.rb
1004
1004
  - fastlane/lib/fastlane/version.rb
1005
1005
  - fastlane_core/README.md
1006
- - fastlane_core/lib/.DS_Store
1007
1006
  - fastlane_core/lib/assets/XMLTemplate.xml.erb
1008
1007
  - fastlane_core/lib/fastlane_core.rb
1009
1008
  - fastlane_core/lib/fastlane_core/cert_checker.rb
@@ -1083,6 +1082,7 @@ files:
1083
1082
  - gym/lib/gym/xcodebuild_fixes/watchkit2_fix.rb
1084
1083
  - gym/lib/gym/xcodebuild_fixes/watchkit_fix.rb
1085
1084
  - match/README.md
1085
+ - match/lib/.DS_Store
1086
1086
  - match/lib/assets/MatchfileTemplate
1087
1087
  - match/lib/assets/READMETemplate.md
1088
1088
  - match/lib/match.rb
@@ -1288,7 +1288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1288
1288
  version: '0'
1289
1289
  requirements: []
1290
1290
  rubyforge_project:
1291
- rubygems_version: 2.5.1
1291
+ rubygems_version: 2.6.8
1292
1292
  signing_key:
1293
1293
  specification_version: 4
1294
1294
  summary: The easiest way to automate beta deployments and releases for your iOS and