fastlane 2.21.0.beta.20170317010039 → 2.21.0.beta.20170318010107

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: 14660ec86a7c837c4af194e13d45ca43a2edb577
4
- data.tar.gz: 20b8bf0f36a430d17a90e03d1a6f138fa6d87891
3
+ metadata.gz: cf118cce127624c1ad2ab2de64a5ba95a97a41e2
4
+ data.tar.gz: 0dbf14f2f2c0fcc7002fb3c691f688ab599dda70
5
5
  SHA512:
6
- metadata.gz: 3a2d377be037bb99627288492447c8745092b62aff45a3088e8f5558bc9a7a166a110ee764d70dbf412eae40ce6b6d3facbed5c6597103feb817f82a557a2549
7
- data.tar.gz: a26aca690b83378df9544082f5e0d5a0bc74e10da65521000b90b258828f562ee073d3c4706d50dc35645ac27965ece4f8792d9538efb0d2dcf54ffae3d08dc1
6
+ metadata.gz: ff752e3a4bf5b0050c25919aa19d6921041120a7a039b563fd5ebabb6ed847f96ca642899b15985a5f3ce30b05ce5e465fd5b85593a950dd018f1f4270d139ad
7
+ data.tar.gz: 4f2b2443f9cedf93f003aa1bb0e93a617b1a17e8cd46d21548178e092456686981de53d48b6275ee801f49ce445a064ed87f9b7198a794b5e25342b359e84c99
@@ -2,6 +2,17 @@
2
2
  Style/ClassCheck:
3
3
  EnforcedStyle: kind_of?
4
4
 
5
+ Style/FrozenStringLiteralComment:
6
+ Enabled: false
7
+
8
+ # This doesn't work with older versions of Ruby (pre 2.4.0)
9
+ Style/SafeNavigation:
10
+ Enabled: false
11
+
12
+ # This doesn't work with older versions of Ruby (pre 2.4.0)
13
+ Performance/RegexpMatch:
14
+ Enabled: false
15
+
5
16
  # .length == 0 is also good, we don't always want .zero?
6
17
  Style/NumericPredicate:
7
18
  Enabled: false
@@ -101,6 +101,17 @@ module Fastlane
101
101
  nil
102
102
  end
103
103
 
104
+ # Pass a action alias symbol (e.g. :enable_automatic_code_signing)
105
+ # and this method will return a reference to the action class
106
+ # if it exists. In case the action with this alias can't be found
107
+ # this method will return nil.
108
+ def class_reference_from_action_alias(method_sym)
109
+ alias_found = find_alias(method_sym.to_s)
110
+ return nil unless alias_found
111
+
112
+ class_reference_from_action_name(alias_found.to_sym)
113
+ end
114
+
104
115
  # lookup if an alias exists
105
116
  def find_alias(action_name)
106
117
  Actions.alias_actions.each do |key, v|
@@ -119,14 +130,12 @@ module Fastlane
119
130
  # First, check if there is a predefined method in the actions folder
120
131
  class_ref = class_reference_from_action_name(method_sym)
121
132
  unless class_ref
122
- alias_found = find_alias(method_sym.to_s)
123
- if alias_found
133
+ class_ref = class_reference_from_action_alias(method_sym)
134
+ # notify action that it has been used by alias
135
+ if class_ref.respond_to?(:alias_used)
124
136
  orig_action = method_sym.to_s
125
- class_ref = class_reference_from_action_name(alias_found.to_sym)
126
- # notify action that it has been used by alias
127
- if class_ref.respond_to?(:alias_used)
128
- class_ref.alias_used(orig_action, arguments.first)
129
- end
137
+ arguments = [{}] if arguments.empty?
138
+ class_ref.alias_used(orig_action, arguments.first)
130
139
  end
131
140
  end
132
141
 
@@ -1,4 +1,4 @@
1
1
  module Fastlane
2
- VERSION = '2.21.0.beta.20170317010039'.freeze
2
+ VERSION = '2.21.0.beta.20170318010107'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  end
@@ -1,3 +1,5 @@
1
+ require 'tempfile'
2
+
1
3
  module FastlaneCore
2
4
  # This class checks if a specific certificate is installed on the current mac
3
5
  class CertChecker
@@ -54,14 +56,13 @@ module FastlaneCore
54
56
  end
55
57
 
56
58
  def self.install_wwdr_certificate
57
- Dir.chdir('/tmp') do
58
- url = 'https://developer.apple.com/certificationauthority/AppleWWDRCA.cer'
59
- filename = File.basename(url)
60
- keychain = wwdr_keychain
61
- keychain = "-k #{keychain.shellescape}" unless keychain.empty?
62
- Helper.backticks("curl -O #{url} && security import #{filename} #{keychain}", print: FastlaneCore::Globals.verbose?)
63
- UI.user_error!("Could not install WWDR certificate") unless $?.success?
64
- end
59
+ url = 'https://developer.apple.com/certificationauthority/AppleWWDRCA.cer'
60
+ file = Tempfile.new('AppleWWDRCA')
61
+ filename = file.path
62
+ keychain = wwdr_keychain
63
+ keychain = "-k #{keychain.shellescape}" unless keychain.empty?
64
+ Helper.backticks("curl -o #{filename} #{url} && security import #{filename} #{keychain}", print: FastlaneCore::Globals.verbose?)
65
+ UI.user_error!("Could not install WWDR certificate") unless $?.success?
65
66
  end
66
67
 
67
68
  def self.wwdr_keychain
@@ -1,6 +1,6 @@
1
1
  module Match
2
2
  class GitHelper
3
- def self.clone(git_url, shallow_clone, manual_password: nil, skip_docs: false, branch: "master")
3
+ def self.clone(git_url, shallow_clone, manual_password: nil, skip_docs: false, branch: "master", git_full_name: nil, git_user_email: nil)
4
4
  return @dir if @dir
5
5
 
6
6
  @dir = Dir.mktmpdir
@@ -21,6 +21,8 @@ module Match
21
21
  UI.user_error!("Error cloning certificates git repo, please make sure you have access to the repository - see instructions above")
22
22
  end
23
23
 
24
+ add_user_config(git_full_name, git_user_email)
25
+
24
26
  UI.user_error!("Error cloning repo, make sure you have access to it '#{git_url}'") unless File.directory?(@dir)
25
27
 
26
28
  checkout_branch(branch) unless branch == "master"
@@ -136,5 +138,23 @@ module Match
136
138
  template = File.read("#{Match::ROOT}/lib/assets/READMETemplate.md")
137
139
  File.write(File.join(directory, "README.md"), template)
138
140
  end
141
+
142
+ def self.add_user_config(user_name, user_email)
143
+ # Add git config if needed
144
+ commands = []
145
+ commands << "git config user.name \"#{user_name}\"" unless user_name.nil?
146
+ commands << "git config user.email \"#{user_email}\"" unless user_email.nil?
147
+
148
+ return if commands.empty?
149
+
150
+ UI.message "Add git user config to local git repo..."
151
+ Dir.chdir(@dir) do
152
+ commands.each do |command|
153
+ FastlaneCore::CommandExecutor.execute(command: command,
154
+ print_all: FastlaneCore::Globals.verbose?,
155
+ print_command: FastlaneCore::Globals.verbose?)
156
+ end
157
+ end
158
+ end
139
159
  end
140
160
  end
@@ -64,6 +64,16 @@ module Match
64
64
  verify_block: proc do |value|
65
65
  ENV["FASTLANE_TEAM_ID"] = value.to_s
66
66
  end),
67
+ FastlaneCore::ConfigItem.new(key: :git_full_name,
68
+ env_name: "MATCH_GIT_FULL_NAME",
69
+ description: "git user full name to commit",
70
+ optional: true,
71
+ default_value: nil),
72
+ FastlaneCore::ConfigItem.new(key: :git_user_email,
73
+ env_name: "MATCH_GIT_USER_EMAIL",
74
+ description: "git user email to commit",
75
+ optional: true,
76
+ default_value: nil),
67
77
  FastlaneCore::ConfigItem.new(key: :team_name,
68
78
  short_option: "-l",
69
79
  env_name: "FASTLANE_TEAM_NAME",
@@ -8,7 +8,7 @@ module Match
8
8
  hide_keys: [:workspace],
9
9
  title: "Summary for match #{Fastlane::VERSION}")
10
10
 
11
- params[:workspace] = GitHelper.clone(params[:git_url], params[:shallow_clone], skip_docs: params[:skip_docs], branch: params[:git_branch])
11
+ params[:workspace] = GitHelper.clone(params[:git_url], params[:shallow_clone], skip_docs: params[:skip_docs], branch: params[:git_branch], git_full_name: params[:git_full_name], git_user_email: params[:git_user_email])
12
12
 
13
13
  unless params[:readonly]
14
14
  self.spaceship = SpaceshipEnsure.new(params[:username])
@@ -51,6 +51,9 @@ module Spaceship
51
51
  # @return (Fixnum) Number of associated identifiers
52
52
  attr_accessor :identifiers_count
53
53
 
54
+ # @return (Array of Spaceship::Portal::AppGroup) Associated groups
55
+ attr_accessor :associated_groups
56
+
54
57
  attr_mapping(
55
58
  'appIdId' => :app_id,
56
59
  'name' => :name,
@@ -68,6 +71,14 @@ module Spaceship
68
71
  )
69
72
 
70
73
  class << self
74
+ # Create a new object based on a hash.
75
+ # This is used to create a new object based on the server response.
76
+ def factory(attrs)
77
+ obj = self.new(attrs)
78
+ obj.unfold_associated_groups(attrs['associatedApplicationGroups'])
79
+ return obj
80
+ end
81
+
71
82
  # @param mac [Bool] Fetches Mac apps if true
72
83
  # @return (Array) Returns all apps available for this account
73
84
  def all(mac: false)
@@ -102,6 +113,12 @@ module Spaceship
102
113
  end
103
114
  end
104
115
 
116
+ def unfold_associated_groups(attrs)
117
+ return unless attrs
118
+ unfolded_associated_groups = attrs.map { |info| Spaceship::Portal::AppGroup.new(info) }
119
+ instance_variable_set(:@associated_groups, unfolded_associated_groups)
120
+ end
121
+
105
122
  # Delete this App ID. This action will most likely fail if the App ID is already in the store
106
123
  # or there are active profiles
107
124
  # @return (App) The app you just deletd
@@ -43,9 +43,7 @@ module Supply
43
43
  # the actual value passed for the rollout argument does not matter because it will be ignored by the Google Play API
44
44
  # but it has to be between 0.05 and 0.5 to pass the validity check. So we are passing the default value 0.1
45
45
  client.update_track(Supply.config[:track], 0.1, nil)
46
- version_codes.each do |apk_version_code|
47
- client.update_track(Supply.config[:track_promote_to], Supply.config[:rollout], apk_version_code)
48
- end
46
+ client.update_track(Supply.config[:track_promote_to], Supply.config[:rollout], version_codes)
49
47
  end
50
48
 
51
49
  def upload_changelogs(language)
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.21.0.beta.20170317010039
4
+ version: 2.21.0.beta.20170318010107
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: 2017-03-17 00:00:00.000000000 Z
17
+ date: 2017-03-18 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: slack-notifier
@@ -1296,23 +1296,23 @@ metadata:
1296
1296
  post_install_message:
1297
1297
  rdoc_options: []
1298
1298
  require_paths:
1299
+ - sigh/lib
1300
+ - gym/lib
1299
1301
  - produce/lib
1302
+ - snapshot/lib
1303
+ - supply/lib
1304
+ - credentials_manager/lib
1300
1305
  - deliver/lib
1301
- - cert/lib
1306
+ - pilot/lib
1307
+ - pem/lib
1308
+ - scan/lib
1309
+ - fastlane_core/lib
1310
+ - frameit/lib
1302
1311
  - fastlane/lib
1303
1312
  - spaceship/lib
1304
- - sigh/lib
1305
- - credentials_manager/lib
1306
- - frameit/lib
1307
- - snapshot/lib
1308
- - gym/lib
1309
- - scan/lib
1310
1313
  - screengrab/lib
1311
1314
  - match/lib
1312
- - supply/lib
1313
- - pilot/lib
1314
- - fastlane_core/lib
1315
- - pem/lib
1315
+ - cert/lib
1316
1316
  required_ruby_version: !ruby/object:Gem::Requirement
1317
1317
  requirements:
1318
1318
  - - ">="