fastlane_core 0.45.0 → 0.46.0

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: 9eaef4162ded29624da0da9464d7b936aa5b63b4
4
- data.tar.gz: 84bd1dbcf2a050a2e81a6cb888acfdde7c97dcf0
3
+ metadata.gz: 46f75e6ce99bc7d7a20f8a175b717f772912b1e9
4
+ data.tar.gz: bbf4f5d4b1ba46504b221cd5b27e2f066a41d84e
5
5
  SHA512:
6
- metadata.gz: 4ca54613c08d8db3547a66af25e0c66fb490be46a7836e8b87d649bed8175f0dd5763b23329335bd627740028fa8ff22e55d1814bf73892d5f462819bd1ee330
7
- data.tar.gz: 9285296f9eb193573e11bdc77bb42f5e928fd3d1172ce7c651c43a9933ae1ff7c4b7fabe5343c5b97cc9010d08d2c18e1572375319670878e912f751e5d4d9b1
6
+ metadata.gz: e5959fc3b5814b26575364a4c6dd3f11e42252b90b3a00e3f59be339e799ca7b2cd21f00be60973b9824043524bd597f96d29a87c3b4b3b5ff58bb4e8c246a7b
7
+ data.tar.gz: a75cc58a5649171a7a8f30232d7251947fd87827d62a8e326532f07adc69a91257dbcf9e323a45f1c32f8adfa3717390b7fe991337658fcffb5240d8e522aa4d
@@ -132,7 +132,7 @@ module FastlaneCore
132
132
 
133
133
  def self.fastlane_enabled?
134
134
  # This is called from the root context on the first start
135
- @enabled ||= File.directory? "./fastlane"
135
+ @enabled ||= (File.directory?("./fastlane") || File.directory?("./.fastlane"))
136
136
  end
137
137
 
138
138
  # Path to the installed gem to load resources (e.g. resign.sh)
@@ -133,7 +133,7 @@ module FastlaneCore
133
133
 
134
134
  # Generates commands and executes the iTMSTransporter through the shell script it provides by the same name
135
135
  class ShellScriptTransporterExecutor < TransporterExecutor
136
- def build_upload_command(username, password, source = "/tmp")
136
+ def build_upload_command(username, password, source = "/tmp", team_id = "")
137
137
  [
138
138
  '"' + Helper.transporter_path + '"',
139
139
  "-m upload",
@@ -142,19 +142,21 @@ module FastlaneCore
142
142
  "-f '#{source}'",
143
143
  ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"], # that's here, because the user might overwrite the -t option
144
144
  "-t 'Signiant'",
145
- "-k 100000"
146
- ].join(' ')
145
+ "-k 100000",
146
+ ("-itc_provider #{team_id}" unless team_id.to_s.empty?)
147
+ ].compact.join(' ')
147
148
  end
148
149
 
149
- def build_download_command(username, password, apple_id, destination = "/tmp")
150
+ def build_download_command(username, password, apple_id, destination = "/tmp", team_id = "")
150
151
  [
151
152
  '"' + Helper.transporter_path + '"',
152
153
  "-m lookupMetadata",
153
154
  "-u \"#{username}\"",
154
155
  "-p #{shell_escaped_password(password)}",
155
156
  "-apple_id #{apple_id}",
156
- "-destination '#{destination}'"
157
- ].join(' ')
157
+ "-destination '#{destination}'",
158
+ ("-itc_provider #{team_id}" unless team_id.to_s.empty?)
159
+ ].compact.join(' ')
158
160
  end
159
161
 
160
162
  def handle_error(password)
@@ -190,7 +192,7 @@ module FastlaneCore
190
192
  # Generates commands and executes the iTMSTransporter by invoking its Java app directly, to avoid the crazy parameter
191
193
  # escaping problems in its accompanying shell script.
192
194
  class JavaTransporterExecutor < TransporterExecutor
193
- def build_upload_command(username, password, source = "/tmp")
195
+ def build_upload_command(username, password, source = "/tmp", team_id = "")
194
196
  [
195
197
  Helper.transporter_java_executable_path.shellescape,
196
198
  "-Djava.ext.dirs=#{Helper.transporter_java_ext_dir.shellescape}",
@@ -209,11 +211,12 @@ module FastlaneCore
209
211
  ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"], # that's here, because the user might overwrite the -t option
210
212
  '-t Signiant',
211
213
  '-k 100000',
214
+ ("-itc_provider #{team_id}" unless team_id.to_s.empty?),
212
215
  '2>&1' # cause stderr to be written to stdout
213
216
  ].compact.join(' ') # compact gets rid of the possibly nil ENV value
214
217
  end
215
218
 
216
- def build_download_command(username, password, apple_id, destination = "/tmp")
219
+ def build_download_command(username, password, apple_id, destination = "/tmp", team_id = "")
217
220
  [
218
221
  Helper.transporter_java_executable_path.shellescape,
219
222
  "-Djava.ext.dirs=#{Helper.transporter_java_ext_dir.shellescape}",
@@ -230,8 +233,9 @@ module FastlaneCore
230
233
  "-p #{password.shellescape}",
231
234
  "-apple_id #{apple_id.shellescape}",
232
235
  "-destination #{destination.shellescape}",
236
+ ("-itc_provider #{team_id}" unless team_id.to_s.empty?),
233
237
  '2>&1' # cause stderr to be written to stdout
234
- ].join(' ')
238
+ ].compact.join(' ')
235
239
  end
236
240
 
237
241
  def handle_error(password)
@@ -270,7 +274,10 @@ module FastlaneCore
270
274
  # @param use_shell_script if true, forces use of the iTMSTransporter shell script.
271
275
  # if false, allows a direct call to the iTMSTransporter Java app (preferred).
272
276
  # see: https://github.com/fastlane/fastlane/pull/4003
273
- def initialize(user = nil, password = nil, use_shell_script = false)
277
+ # @param team_id Represents the developer team id (not the iTC id). If provided, will add the correct
278
+ # flag to the upload command.
279
+ # see: https://github.com/fastlane/fastlane/issues/1524
280
+ def initialize(user = nil, password = nil, use_shell_script = false, team_id = nil)
274
281
  # Xcode 6.x doesn't have the same iTMSTransporter Java setup as later Xcode versions, so
275
282
  # we can't default to using the better direct Java invocation strategy for those versions.
276
283
  use_shell_script ||= Helper.is_mac? && Helper.xcode_version.start_with?('6.')
@@ -292,6 +299,7 @@ module FastlaneCore
292
299
  end
293
300
 
294
301
  @transporter_executor = use_shell_script ? ShellScriptTransporterExecutor.new : JavaTransporterExecutor.new
302
+ @team_id = team_id || (ENV['FASTLANE_TEAM_ID'] || '').strip
295
303
  end
296
304
 
297
305
  # Downloads the latest version of the app metadata package from iTC.
@@ -304,8 +312,8 @@ module FastlaneCore
304
312
  dir ||= "/tmp"
305
313
 
306
314
  UI.message("Going to download app metadata from iTunes Connect")
307
- command = @transporter_executor.build_download_command(@user, @password, app_id, dir)
308
- UI.verbose(@transporter_executor.build_download_command(@user, 'YourPassword', app_id, dir))
315
+ command = @transporter_executor.build_download_command(@user, @password, app_id, dir, @team_id)
316
+ UI.verbose(@transporter_executor.build_download_command(@user, 'YourPassword', app_id, dir, @team_id))
309
317
 
310
318
  begin
311
319
  result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?)
@@ -340,8 +348,8 @@ module FastlaneCore
340
348
  UI.message("Going to upload updated app to iTunes Connect")
341
349
  UI.success("This might take a few minutes, please don't interrupt the script")
342
350
 
343
- command = @transporter_executor.build_upload_command(@user, @password, actual_dir)
344
- UI.verbose(@transporter_executor.build_upload_command(@user, 'YourPassword', actual_dir))
351
+ command = @transporter_executor.build_upload_command(@user, @password, actual_dir, @team_id)
352
+ UI.verbose(@transporter_executor.build_upload_command(@user, 'YourPassword', actual_dir, @team_id))
345
353
 
346
354
  begin
347
355
  result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?)
@@ -17,7 +17,7 @@ module FastlaneCore
17
17
 
18
18
  def self.fetch_distribution_xml_file(path)
19
19
  Dir.mktmpdir do |dir|
20
- Helper.backticks("xar -C #{dir} -xf #{path}")
20
+ Helper.backticks("xar -C #{dir.shellescape} -xf #{path.shellescape}")
21
21
 
22
22
  Dir.foreach(dir) do |file|
23
23
  next unless file.include? 'Distribution'
@@ -14,8 +14,13 @@ module FastlaneCore
14
14
  end
15
15
 
16
16
  @log.formatter = proc do |severity, datetime, progname, msg|
17
- string = "#{severity} [#{datetime.strftime('%Y-%m-%d %H:%M:%S.%2N')}]: " if $verbose
18
- string = "[#{datetime.strftime('%H:%M:%S')}]: " unless $verbose
17
+ if $verbose
18
+ string = "#{severity} [#{datetime.strftime('%Y-%m-%d %H:%M:%S.%2N')}]: "
19
+ elsif ENV["FASTLANE_HIDE_TIMESTAMP"]
20
+ string = ""
21
+ else
22
+ string = "[#{datetime.strftime('%H:%M:%S')}]: "
23
+ end
19
24
 
20
25
  string += "#{msg}\n"
21
26
 
@@ -1,3 +1,3 @@
1
1
  module FastlaneCore
2
- VERSION = "0.45.0".freeze
2
+ VERSION = "0.46.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.45.0
4
+ version: 0.46.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-05-26 00:00:00.000000000 Z
11
+ date: 2016-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -385,7 +385,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
385
385
  version: '0'
386
386
  requirements: []
387
387
  rubyforge_project:
388
- rubygems_version: 2.4.8
388
+ rubygems_version: 2.4.0
389
389
  signing_key:
390
390
  specification_version: 4
391
391
  summary: Contains all shared code/dependencies of the fastlane.tools