fastlane 2.79.0.beta.20180125010002 → 2.79.0.beta.20180126010002

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: 11e6756a9c895869f254e318c69c43ed3baaa59e
4
- data.tar.gz: 8055f34b7f3e1867796fb9b3c7f843f7357d5b60
3
+ metadata.gz: c42fa4d4c7579f385aa71cc864e42709751a2fda
4
+ data.tar.gz: 2a701839cc3646b4875653f6f7fe5babcd6c4ba5
5
5
  SHA512:
6
- metadata.gz: 9a5e32e2274caace14cb5077d37800c5127ed8387d9c02f49692b2153c7fdd4ec84fb4e64d97d93ea2f8f3114de16d048eae3550e824afc130c6a487f00e81c1
7
- data.tar.gz: 7533072ceaa9eacb2008edcfc70703bb9c4a3e67adfead9d3d5655a8bc258285d79a51675987d37c841ce240a7b4b46e12a3823f89838ed33e3034cf338ce1cb
6
+ metadata.gz: a29f9effb8764fe17dc96eea920a8f272bb37eb94a09c3ba4f276c733b389c9f9edd89b8ecfa18bdb4a36dbfb28b81c70acb9b117b5363c304babe322c1e7a21
7
+ data.tar.gz: c917124ede827b896125e7435c71609be4ffb561877b29f2e2baebbb8f49264b23222aef4e6a3448443280fd11d2e1afff5fb03291542fa7206b5cf1e958f924
@@ -2,6 +2,14 @@ module Fastlane
2
2
  module Actions
3
3
  class PutsAction < Action
4
4
  def self.run(params)
5
+ # display text from the message param (most likely coming from Swift)
6
+ # if called like `puts 'hi'` then params won't be a configuration item, so we have to check
7
+ if params.kind_of?(FastlaneCore::Configuration) && params[:message]
8
+ UI.message(params[:message])
9
+ return
10
+ end
11
+
12
+ # no paramter included in the call means treat this like a normal fastlane ruby call
5
13
  UI.message(params.join(' '))
6
14
  end
7
15
 
@@ -13,6 +21,16 @@ module Fastlane
13
21
  "Prints out the given text"
14
22
  end
15
23
 
24
+ def self.available_options
25
+ [
26
+ FastlaneCore::ConfigItem.new(key: :message,
27
+ env_name: "FL_PUTS_MESSAGE",
28
+ description: "Message to be printed out. Fastlane.swift only",
29
+ optional: true,
30
+ is_string: true)
31
+ ]
32
+ end
33
+
16
34
  def self.authors
17
35
  ["KrauseFx"]
18
36
  end
@@ -22,7 +40,9 @@ module Fastlane
22
40
  end
23
41
 
24
42
  def self.alias_used(action_alias, params)
25
- UI.important("#{action_alias} called, please use 'puts' instead!")
43
+ if !params.kind_of?(FastlaneCore::Configuration) || params[:message].nil?
44
+ UI.important("#{action_alias} called, please use 'puts' instead!")
45
+ end
26
46
  end
27
47
 
28
48
  def self.aliases
@@ -9,7 +9,7 @@ module Fastlane
9
9
 
10
10
  def initialize(path = nil)
11
11
  version_var_name = 'version'
12
- @version_regex = /^(?<begin>[^#]*#{version_var_name}\s*=\s*['"])(?<value>(?<major>[0-9]+)(\.(?<minor>[0-9]+))?(\.(?<patch>[0-9]+))?(?<appendix>(\.[0-9]+)*)?)(?<end>['"])/i
12
+ @version_regex = /^(?<begin>[^#]*\w\.#{version_var_name}\s*=\s*['"])(?<value>(?<major>[0-9]+)(\.(?<minor>[0-9]+))?(\.(?<patch>[0-9]+))?(?<appendix>(\.[0-9]+)*)?)(?<end>['"])/i
13
13
 
14
14
  return unless (path || '').length > 0
15
15
  UI.user_error!("Could not find podspec file at path '#{path}'") unless File.exist?(path)
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.79.0.beta.20180125010002'.freeze
2
+ VERSION = '2.79.0.beta.20180126010002'.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
@@ -2385,6 +2385,10 @@ func pushToGitRemote(localBranch: String? = nil,
2385
2385
  RubyCommand.Argument(name: "remote", value: remote)])
2386
2386
  _ = runner.executeCommand(command)
2387
2387
  }
2388
+ func puts(message: String) {
2389
+ let command = RubyCommand(commandID: "", methodName: "puts", className: nil, args: [RubyCommand.Argument(name: "message", value: message)])
2390
+ _ = runner.executeCommand(command)
2391
+ }
2388
2392
  @discardableResult func readPodspec(path: String) -> [String : String] {
2389
2393
  let command = RubyCommand(commandID: "", methodName: "read_podspec", className: nil, args: [RubyCommand.Argument(name: "path", value: path)])
2390
2394
  return parseDictionary(fromString: runner.executeCommand(command))
@@ -47,9 +47,9 @@ module FastlaneCore
47
47
  end
48
48
 
49
49
  begin
50
- FastlaneCore::FastlanePty.spawn(command) do |stdin, stdout, pid|
50
+ FastlaneCore::FastlanePty.spawn(command) do |command_stdout, command_stdin, pid|
51
51
  begin
52
- stdin.each do |l|
52
+ command_stdout.each do |l|
53
53
  line = l.strip # strip so that \n gets removed
54
54
  output << line
55
55
 
@@ -3,18 +3,18 @@
3
3
  # https://github.com/DragonBox/u3d/blob/59e471ad78ac00cb629f479dbe386c5ad2dc5075/lib/u3d_core/command_runner.rb#L88-L96
4
4
  module FastlaneCore
5
5
  class FastlanePty
6
- def self.spawn(*command, &block)
6
+ def self.spawn(command, &block)
7
7
  require 'pty'
8
- PTY.spawn(command) do |stdout, stdin, pid|
9
- block.call(stdin, stdout, pid)
8
+ PTY.spawn(command) do |command_stdout, command_stdin, pid|
9
+ block.call(command_stdout, command_stdin, pid)
10
10
  end
11
11
  rescue LoadError
12
12
  require 'open3'
13
- Open3.popen2e(command) do |r, w, p|
14
- yield(w, r, p.value.pid) # note the inversion
13
+ Open3.popen2e(command) do |command_stdin, command_stdout, p| # note the inversion
14
+ yield(command_stdout, command_stdin, p.value.pid)
15
15
 
16
- r.close
17
- w.close
16
+ command_stdin.close
17
+ command_stdout.close
18
18
  p.value.exitstatus
19
19
  end
20
20
  end
@@ -44,9 +44,9 @@ module FastlaneCore
44
44
  end
45
45
 
46
46
  begin
47
- FastlaneCore::FastlanePty.spawn(command) do |stdin, stdout, pid|
47
+ FastlaneCore::FastlanePty.spawn(command) do |command_stdout, command_stdin, pid|
48
48
  begin
49
- stdin.each do |line|
49
+ command_stdout.each do |line|
50
50
  @all_lines << line
51
51
  parse_line(line, hide_output) # this is where the parsing happens
52
52
  end
@@ -65,23 +65,23 @@ module FastlaneCore
65
65
  def self.show_update_message(gem_name, current_version)
66
66
  available = server_results[gem_name]
67
67
  puts("")
68
- puts('#######################################################################'.green)
68
+ puts('#######################################################################')
69
69
  if available
70
- puts("# #{gem_name} #{available} is available. You are on #{current_version}.".green)
70
+ puts("# #{gem_name} #{available} is available. You are on #{current_version}.")
71
71
  else
72
- puts("# An update for #{gem_name} is available. You are on #{current_version}.".green)
72
+ puts("# An update for #{gem_name} is available. You are on #{current_version}.")
73
73
  end
74
- puts("# You should use the latest version.".green)
75
- puts("# Please update using `#{self.update_command(gem_name: gem_name)}`.".green)
74
+ puts("# You should use the latest version.")
75
+ puts("# Please update using `#{self.update_command(gem_name: gem_name)}`.")
76
76
 
77
- puts("# To see what's new, open https://github.com/fastlane/#{gem_name}/releases.".green) if FastlaneCore::Env.truthy?("FASTLANE_HIDE_CHANGELOG")
77
+ puts("# To see what's new, open https://github.com/fastlane/#{gem_name}/releases.") if FastlaneCore::Env.truthy?("FASTLANE_HIDE_CHANGELOG")
78
78
 
79
79
  if !Helper.bundler? && !Helper.contained_fastlane? && Random.rand(5) == 1
80
80
  # We want to show this message from time to time, if the user doesn't use bundler, nor bundled fastlane
81
- puts('#######################################################################'.green)
82
- puts("# Run `sudo gem cleanup` from time to time to speed up fastlane".green)
81
+ puts('#######################################################################')
82
+ puts("# Run `sudo gem cleanup` from time to time to speed up fastlane")
83
83
  end
84
- puts('#######################################################################'.green)
84
+ puts('#######################################################################')
85
85
  Changelog.show_changes(gem_name, current_version, update_gem_command: UpdateChecker.update_command(gem_name: gem_name)) unless FastlaneCore::Env.truthy?("FASTLANE_HIDE_CHANGELOG")
86
86
 
87
87
  ensure_rubygems_source
@@ -181,7 +181,7 @@ module Match
181
181
  return unless @dir
182
182
 
183
183
  result = Dir.chdir(@dir) do
184
- FastlaneCore::CommandExecutor.execute(command: "git branch --list origin/#{branch.shellescape} --no-color -r",
184
+ FastlaneCore::CommandExecutor.execute(command: "git --no-pager branch --list origin/#{branch.shellescape} --no-color -r",
185
185
  print_all: FastlaneCore::Globals.verbose?,
186
186
  print_command: FastlaneCore::Globals.verbose?)
187
187
  end
@@ -28,9 +28,9 @@ module Snapshot
28
28
  next unless command
29
29
 
30
30
  # Only rotate if we need to
31
- FastlaneCore::FastlanePty.spawn(command) do |r, w, pid|
32
- r.sync
33
- r.each do |line|
31
+ FastlaneCore::FastlanePty.spawn(command) do |command_stdout, command_stdin, pid|
32
+ command_stdout.sync
33
+ command_stdout.each do |line|
34
34
  # We need to read this otherwise things hang
35
35
  end
36
36
  ::Process.wait(pid)
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.79.0.beta.20180125010002
4
+ version: 2.79.0.beta.20180126010002
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Holtz
@@ -25,7 +25,7 @@ authors:
25
25
  autorequire:
26
26
  bindir: bin
27
27
  cert_chain: []
28
- date: 2018-01-25 00:00:00.000000000 Z
28
+ date: 2018-01-26 00:00:00.000000000 Z
29
29
  dependencies:
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: slack-notifier