fastlane 2.63.0 → 2.64.0.beta.20171101010004

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: 58cf448c74f4373a46e85891ad620b747422bfc3
4
- data.tar.gz: 4da0f92d22350d5204e55c380ad327548a9329d9
3
+ metadata.gz: 84e6b7a46ac0790cb80d6b81d37ba17b37cedd56
4
+ data.tar.gz: c07dc23dc7c778069615349c9362dc0e9fe9cc3b
5
5
  SHA512:
6
- metadata.gz: 34f15e6ea801f67af99331c7eda659612070f92747af3f92fc9a8b5edf7bc08d4898899941e0a5b2619f14f6af1e285abd95c9301139af3a56416fd24d8d53ac
7
- data.tar.gz: 2e97405e2c30ea7e711ba499c3a28f8a50cad38a6195c04f6f7a18e6a964b2f99de3e96bc16de54515cd5a86f0a49bc43666bf2c82719b3af5160255204b09f9
6
+ metadata.gz: dd227d9e63303cb05401b7524e7b9976864e2df9fab2ac3252ec94c04f787a2f6a59bebfdcd551416a9a5ce1d37dfd6ff3783cfa933cfddb850da3d14c3201bc
7
+ data.tar.gz: 19c0a761f22a433b825960a96333d9cda756bb40393ef4dadb9ddf41440ce92508d227361ce99e06b53c4e700b53606454665f01d6a8cb3fb459eb70b763e988
@@ -1,10 +1,27 @@
1
+ require 'pathname'
2
+
1
3
  module Fastlane
2
4
  module Actions
5
+ module SharedValues
6
+ MODIFIED_FILES = :MODIFIED_FILES
7
+ end
8
+
9
+ class << self
10
+ # Add an array of paths relative to the repo root or absolute paths that have been modified by
11
+ # an action.
12
+ #
13
+ # :files: An array of paths relative to the repo root or absolute paths
14
+ def add_modified_files(files)
15
+ modified_files = lane_context[SharedValues::MODIFIED_FILES] || Set.new
16
+ modified_files += files
17
+ lane_context[SharedValues::MODIFIED_FILES] = modified_files
18
+ end
19
+ end
20
+
3
21
  # Commits the current changes in the repo as a version bump, checking to make sure only files which contain version information have been changed.
4
22
  class CommitVersionBumpAction < Action
5
23
  def self.run(params)
6
24
  require 'xcodeproj'
7
- require 'pathname'
8
25
  require 'set'
9
26
  require 'shellwords'
10
27
 
@@ -61,8 +78,11 @@ module Fastlane
61
78
  end
62
79
  end
63
80
 
81
+ extra_files = params[:include]
82
+ extra_files += modified_files_relative_to_repo_root(repo_path)
83
+
64
84
  # create our list of files that we expect to have changed, they should all be relative to the project root, which should be equal to the git workdir root
65
- expected_changed_files = []
85
+ expected_changed_files = extra_files
66
86
  expected_changed_files << pbxproj_path
67
87
  expected_changed_files << info_plist_files
68
88
 
@@ -154,7 +174,12 @@ module Fastlane
154
174
  description: "A regular expression used to filter matched plist files to be modified",
155
175
  optional: true,
156
176
  default_value: nil,
157
- is_string: false)
177
+ is_string: false),
178
+ FastlaneCore::ConfigItem.new(key: :include,
179
+ description: "A list of extra files to be included in the version bump (string array or comma-separated string)",
180
+ optional: true,
181
+ default_value: [],
182
+ type: Array)
158
183
  ]
159
184
  end
160
185
 
@@ -197,6 +222,12 @@ module Fastlane
197
222
  )',
198
223
  'commit_version_bump(
199
224
  settings: %w[About.plist Root.plist] # Include more than one plist from Settings.bundle
225
+ )',
226
+ 'commit_version_bump(
227
+ include: %w[package.json custom.cfg] # include other updated files as part of the version bump
228
+ )',
229
+ 'commit_version_bump(
230
+ ignore: /OtherProject/ # ignore files matching a regular expression
200
231
  )'
201
232
  ]
202
233
  end
@@ -208,22 +239,33 @@ module Fastlane
208
239
  class << self
209
240
  def settings_plists_from_param(param)
210
241
  if param.kind_of? String
211
- # commit_version_bump xcodeproj: "MyProject.xcodeproj", settings: "About.plist"
242
+ # commit_version_bump settings: "About.plist"
212
243
  return [param]
213
244
  elsif param.kind_of? Array
214
- # commit_version_bump xcodeproj: "MyProject.xcodeproj", settings: [ "Root.plist", "About.plist" ]
245
+ # commit_version_bump settings: ["Root.plist", "About.plist"]
215
246
  return param
247
+ else
248
+ # commit_version_bump settings: true # Root.plist
249
+ return ["Root.plist"]
216
250
  end
217
-
218
- # commit_version_bump xcodeproj: "MyProject.xcodeproj", settings: true # Root.plist
219
- ["Root.plist"]
220
251
  end
221
252
 
222
253
  def settings_bundle_file_path(project, settings_file_name)
223
254
  settings_bundle = project.files.find { |f| f.path =~ /Settings.bundle/ }
224
255
  raise "No Settings.bundle in project" if settings_bundle.nil?
225
256
 
226
- File.join(settings_bundle.real_path, settings_file_name)
257
+ return File.join(settings_bundle.real_path, settings_file_name)
258
+ end
259
+
260
+ def modified_files_relative_to_repo_root(repo_root)
261
+ return [] if Actions.lane_context[SharedValues::MODIFIED_FILES].nil?
262
+
263
+ root_pathname = Pathname.new repo_root
264
+ all_modified_files = Actions.lane_context[SharedValues::MODIFIED_FILES].map do |path|
265
+ next path unless path =~ %r{^/}
266
+ Pathname.new(path).relative_path_from(root_pathname).to_s
267
+ end
268
+ return all_modified_files.uniq
227
269
  end
228
270
  end
229
271
  end
@@ -80,6 +80,12 @@ module Fastlane
80
80
  dsym_io = Faraday::UploadIO.new(dsym, 'application/octet-stream') if dsym and File.exist?(dsym)
81
81
  end
82
82
 
83
+ # https://support.hockeyapp.net/discussions/problems/83559
84
+ # Should not set status to "2" (downloadable) until after the app is uploaded, so allow the caller
85
+ # to specify a different status for the `create` step
86
+ update_status = options[:status]
87
+ options[:status] = options[:create_status]
88
+
83
89
  response = connection.get do |req|
84
90
  req.url("/api/2/apps/#{app_id}/app_versions/new")
85
91
  req.headers['X-HockeyAppToken'] = api_token
@@ -100,6 +106,8 @@ module Fastlane
100
106
  options[:dsym] = dsym_io
101
107
  end
102
108
 
109
+ options[:status] = update_status
110
+
103
111
  connection.put do |req|
104
112
  req.options.timeout = options.delete(:timeout)
105
113
  req.url("/api/2/apps/#{app_id}/app_versions/#{app_version_id}")
@@ -239,6 +247,10 @@ module Fastlane
239
247
  env_name: "FL_HOCKEY_STATUS",
240
248
  description: "Download status: \"1\" = No user can download; \"2\" = Available for download (only possible with full-access token)",
241
249
  default_value: "2"),
250
+ FastlaneCore::ConfigItem.new(key: :create_status,
251
+ env_name: "FL_HOCKEY_CREATE_STATUS",
252
+ description: "Download status for initial version creation when create_update is true: \"1\" = No user can download; \"2\" = Available for download (only possible with full-access token)",
253
+ default_value: "2"),
242
254
  FastlaneCore::ConfigItem.new(key: :notes_type,
243
255
  env_name: "FL_HOCKEY_NOTES_TYPE",
244
256
  description: "Notes type for your :notes, \"0\" = Textile, \"1\" = Markdown (default)",
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.63.0'.freeze
2
+ VERSION = '2.64.0.beta.20171101010004'.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
  RUBOCOP_REQUIREMENT = '0.49.1'.freeze
@@ -112,7 +112,7 @@ open class Snapshot: NSObject {
112
112
  do {
113
113
  let launchArguments = try String(contentsOf: path, encoding: String.Encoding.utf8)
114
114
  let regex = try NSRegularExpression(pattern: "(\\\".+?\\\"|\\S+)", options: [])
115
- let matches = regex.matches(in: launchArguments, options: [], range: NSRange(location:0, length:launchArguments.characters.count))
115
+ let matches = regex.matches(in: launchArguments, options: [], range: NSRange(location: 0, length: launchArguments.characters.count))
116
116
  let results = matches.map { result -> String in
117
117
  (launchArguments as NSString).substring(with: result.range)
118
118
  }
@@ -40,8 +40,12 @@ module Snapshot
40
40
 
41
41
  destinations = devices.map do |d|
42
42
  device = find_device(d, os_version)
43
- UI.user_error!("No device found named '#{d}' for version '#{os_version}'") if device.nil?
44
- "-destination 'platform=#{os} Simulator,name=#{device.name},OS=#{os_version}'"
43
+ if device.nil?
44
+ UI.user_error!("No device found named '#{d}' for version '#{os_version}'") if device.nil?
45
+ elsif device.os_version != os_version
46
+ UI.important("Using device named '#{device.name}' with version '#{device.os_version}' because no match was found for version '#{os_version}'")
47
+ end
48
+ "-destination 'platform=#{os} Simulator,name=#{device.name},OS=#{device.os_version}'"
45
49
  end
46
50
 
47
51
  return [destinations.join(' ')]
@@ -39,7 +39,7 @@ module Snapshot
39
39
  elsif device.os_version != os_version
40
40
  UI.important("Using device named '#{device_name}' with version '#{device.os_version}' because no match was found for version '#{os_version}'")
41
41
  end
42
- value = "platform=#{os} Simulator,id=#{device.udid},OS=#{os_version}"
42
+ value = "platform=#{os} Simulator,id=#{device.udid},OS=#{device.os_version}"
43
43
 
44
44
  return ["-destination '#{value}'"]
45
45
  end
@@ -71,7 +71,6 @@ module Spaceship
71
71
 
72
72
  attr_mapping({
73
73
  # Ad ID Info Section
74
- 'adIdInfo.limitsTracking.value' => :add_id_info_uses_idfa,
75
74
  'adIdInfo.servesAds.value' => :add_id_info_serves_ads,
76
75
  'adIdInfo.tracksAction.value' => :add_id_info_tracks_action,
77
76
  'adIdInfo.tracksInstall.value' => :add_id_info_tracks_install,
@@ -132,6 +131,16 @@ module Spaceship
132
131
  end
133
132
  raw_data_clone.delete("version")
134
133
 
134
+ # Check whether the application makes use of IDFA or not
135
+ # and automatically set the mandatory limitsTracking value in the request JSON accordingly.
136
+ if !self.add_id_info_uses_idfa.nil? && self.add_id_info_uses_idfa == true
137
+ # Application uses IDFA, before sending for submission limitsTracking key in the request JSON must be set to true (agreement).
138
+ raw_data_clone.set(
139
+ ["adIdInfo", "limitsTracking", "value"],
140
+ true
141
+ )
142
+ end
143
+
135
144
  client.send_app_submission(application.apple_id, application.edit_version.version_id, raw_data_clone)
136
145
  @submitted_for_review = true
137
146
  end
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.63.0
4
+ version: 2.64.0.beta.20171101010004
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-10-31 00:00:00.000000000 Z
18
+ date: 2017-11-01 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: slack-notifier
@@ -1362,7 +1362,6 @@ files:
1362
1362
  - sigh/lib/sigh/resign.rb
1363
1363
  - sigh/lib/sigh/runner.rb
1364
1364
  - snapshot/README.md
1365
- - snapshot/lib/.DS_Store
1366
1365
  - snapshot/lib/assets/SnapfileTemplate
1367
1366
  - snapshot/lib/assets/SnapshotHelper.swift
1368
1367
  - snapshot/lib/assets/SnapshotHelperXcode8.swift
@@ -1504,24 +1503,24 @@ metadata:
1504
1503
  post_install_message:
1505
1504
  rdoc_options: []
1506
1505
  require_paths:
1507
- - cert/lib
1508
- - credentials_manager/lib
1509
- - deliver/lib
1510
- - fastlane/lib
1511
- - fastlane_core/lib
1512
- - frameit/lib
1513
- - gym/lib
1506
+ - supply/lib
1507
+ - screengrab/lib
1514
1508
  - match/lib
1515
- - pem/lib
1516
- - pilot/lib
1517
1509
  - precheck/lib
1510
+ - sigh/lib
1518
1511
  - produce/lib
1519
1512
  - scan/lib
1520
- - screengrab/lib
1521
- - sigh/lib
1513
+ - gym/lib
1522
1514
  - snapshot/lib
1515
+ - frameit/lib
1516
+ - fastlane/lib
1517
+ - cert/lib
1518
+ - pilot/lib
1523
1519
  - spaceship/lib
1524
- - supply/lib
1520
+ - credentials_manager/lib
1521
+ - deliver/lib
1522
+ - fastlane_core/lib
1523
+ - pem/lib
1525
1524
  required_ruby_version: !ruby/object:Gem::Requirement
1526
1525
  requirements:
1527
1526
  - - ">="
@@ -1529,15 +1528,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
1529
1528
  version: 2.0.0
1530
1529
  required_rubygems_version: !ruby/object:Gem::Requirement
1531
1530
  requirements:
1532
- - - ">="
1531
+ - - ">"
1533
1532
  - !ruby/object:Gem::Version
1534
- version: '0'
1533
+ version: 1.3.1
1535
1534
  requirements: []
1536
1535
  rubyforge_project:
1537
- rubygems_version: 2.6.8
1536
+ rubygems_version: 2.4.5.1
1538
1537
  signing_key:
1539
1538
  specification_version: 4
1540
1539
  summary: The easiest way to automate beta deployments and releases for your iOS and
1541
1540
  Android apps
1542
1541
  test_files: []
1543
- has_rdoc:
Binary file