fastlane 2.36.0.beta.20170530010040 → 2.36.0.beta.20170531010050
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 +4 -4
- data/LICENSE +1 -1
- data/fastlane/lib/fastlane/runner.rb +2 -2
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +1 -0
- data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +20 -2
- data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +1 -2
- data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_error.rb +8 -0
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +43 -22
- data/produce/README.md +40 -14
- data/produce/lib/produce/developer_center.rb +43 -9
- data/produce/lib/produce/options.rb +24 -4
- data/spaceship/lib/spaceship/portal/app.rb +5 -5
- data/spaceship/lib/spaceship/portal/portal_client.rb +2 -2
- data/supply/lib/supply/options.rb +1 -1
- data/supply/lib/supply/uploader.rb +6 -2
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a7e97167dc89fa471f4602ad69d2b4044a89f4a
|
4
|
+
data.tar.gz: a0aed9383787dff07a3d48d8cbc23d4f3d1f8ebc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24ea7852f21b2813514383e80afc4c1dcfef93ce0197ba340af231e51c5f7fd4828afa06e1a70815ab18d44fa30d458095e171150a22d0e62b30c6f9055c6934
|
7
|
+
data.tar.gz: b93d3e7efd090f3888a7e4889f659c69b26dd3f860f95bc2df2d1960ff5a37056b8653dab916b10511b5ad8cb651d6c9a4e3030b4f126e4de5a1327a015d4db2
|
data/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2015
|
3
|
+
Copyright (c) 2015-present the fastlane authors
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
@@ -258,13 +258,13 @@ module Fastlane
|
|
258
258
|
raise e
|
259
259
|
rescue FastlaneCore::Interface::FastlaneError => e # user_error!
|
260
260
|
FastlaneCore::CrashReporter.report_crash(exception: e, action: method_sym)
|
261
|
-
collector.did_raise_error(method_sym)
|
261
|
+
collector.did_raise_error(method_sym) if e.fastlane_should_report_metrics?
|
262
262
|
raise e
|
263
263
|
rescue Exception => e # rubocop:disable Lint/RescueException
|
264
264
|
# high chance this is actually FastlaneCore::Interface::FastlaneCrash, but can be anything else
|
265
265
|
# Catches all exceptions, since some plugins might use system exits to get out
|
266
266
|
FastlaneCore::CrashReporter.report_crash(exception: e, action: method_sym)
|
267
|
-
collector.did_crash(method_sym)
|
267
|
+
collector.did_crash(method_sym) if e.fastlane_should_report_metrics?
|
268
268
|
raise e
|
269
269
|
end
|
270
270
|
end
|
@@ -39,6 +39,9 @@ module FastlaneCore
|
|
39
39
|
# Allows items expected to be strings used in shell arguments to be alternatively provided as a Hash or Array for better readability and auto-escaped for us.
|
40
40
|
attr_accessor :allow_shell_conversion
|
41
41
|
|
42
|
+
# [Boolean] Set if the variable can be used from shell
|
43
|
+
attr_accessor :display_in_shell
|
44
|
+
|
42
45
|
# Creates a new option
|
43
46
|
# @param key (Symbol) the key which is used as command parameters or key in the fastlane tools
|
44
47
|
# @param env_name (String) the name of the environment variable, which is only used if no other values were found
|
@@ -55,7 +58,21 @@ module FastlaneCore
|
|
55
58
|
# @param conflict_block an optional block which is called when options conflict happens
|
56
59
|
# @param deprecated (String) Set if the option is deprecated. A deprecated option should be optional and is made optional if the parameter isn't set, and fails otherwise
|
57
60
|
# @param sensitive (Boolean) Set if the variable is sensitive, such as a password or API token, to prevent echoing when prompted for the parameter
|
58
|
-
|
61
|
+
# @param display_in_shell (Boolean) Set if the variable can be used from shell
|
62
|
+
def initialize(key: nil,
|
63
|
+
env_name: nil,
|
64
|
+
description: nil,
|
65
|
+
short_option: nil,
|
66
|
+
default_value: nil,
|
67
|
+
verify_block: nil,
|
68
|
+
is_string: true,
|
69
|
+
type: nil,
|
70
|
+
optional: nil,
|
71
|
+
conflicting_options: nil,
|
72
|
+
conflict_block: nil,
|
73
|
+
deprecated: nil,
|
74
|
+
sensitive: nil,
|
75
|
+
display_in_shell: true)
|
59
76
|
UI.user_error!("key must be a symbol") unless key.kind_of? Symbol
|
60
77
|
UI.user_error!("env_name must be a String") unless (env_name || '').kind_of? String
|
61
78
|
|
@@ -81,8 +98,8 @@ module FastlaneCore
|
|
81
98
|
# deprecated options are marked deprecated in their description
|
82
99
|
description = "[DEPRECATED!] #{deprecated} - #{description}"
|
83
100
|
end
|
84
|
-
optional = false if optional.nil?
|
85
101
|
|
102
|
+
optional = false if optional.nil?
|
86
103
|
sensitive = false if sensitive.nil?
|
87
104
|
|
88
105
|
@key = key
|
@@ -100,6 +117,7 @@ module FastlaneCore
|
|
100
117
|
@deprecated = deprecated
|
101
118
|
@sensitive = sensitive
|
102
119
|
@allow_shell_conversion = (type == :shell_string)
|
120
|
+
@display_in_shell = display_in_shell
|
103
121
|
end
|
104
122
|
|
105
123
|
def verify!(value)
|
@@ -34,4 +34,12 @@ class Exception
|
|
34
34
|
plugin_frame = backtrace.find { |frame| frame.include?('fastlane-plugin-') }
|
35
35
|
!plugin_frame.nil?
|
36
36
|
end
|
37
|
+
|
38
|
+
def fastlane_should_report_metrics?
|
39
|
+
if fastlane_crash_came_from_plugin? || fastlane_crash_came_from_custom_action?
|
40
|
+
false
|
41
|
+
else
|
42
|
+
true
|
43
|
+
end
|
44
|
+
end
|
37
45
|
end
|
@@ -15,6 +15,9 @@ module Commander
|
|
15
15
|
# In particular we want to distinguish between user_error! and crash! (one with, one without stack trace)
|
16
16
|
class Runner
|
17
17
|
# Code taken from https://github.com/commander-rb/commander/blob/master/lib/commander/runner.rb#L50
|
18
|
+
|
19
|
+
attr_accessor :collector
|
20
|
+
|
18
21
|
def run!
|
19
22
|
require_program :version, :description
|
20
23
|
trap('INT') { abort program(:int_message) } if program(:int_message)
|
@@ -31,8 +34,6 @@ module Commander
|
|
31
34
|
parse_global_options
|
32
35
|
remove_global_options options, @args
|
33
36
|
|
34
|
-
collector = FastlaneCore::ToolCollector.new
|
35
|
-
|
36
37
|
begin
|
37
38
|
collector.did_launch_action(@program[:name])
|
38
39
|
run_active_command
|
@@ -80,36 +81,56 @@ module Commander
|
|
80
81
|
rescue FastlaneCore::Interface::FastlaneCommonException => e # these are exceptions that we dont count as crashes
|
81
82
|
display_user_error!(e, e.to_s)
|
82
83
|
rescue FastlaneCore::Interface::FastlaneError => e # user_error!
|
83
|
-
|
84
|
-
show_github_issues(e.message) if e.show_github_issues
|
85
|
-
FastlaneCore::CrashReporter.report_crash(exception: e, action: @program[:name])
|
86
|
-
display_user_error!(e, e.message)
|
84
|
+
rescue_fastlane_error(e)
|
87
85
|
rescue Errno::ENOENT => e
|
88
|
-
|
89
|
-
puts ""
|
90
|
-
FastlaneCore::UI.important("Error accessing file, this might be due to fastlane's directory handling")
|
91
|
-
FastlaneCore::UI.important("Check out https://docs.fastlane.tools/advanced/#directory-behavior for more details")
|
92
|
-
puts ""
|
93
|
-
FastlaneCore::CrashReporter.report_crash(exception: e, action: @program[:name])
|
94
|
-
raise e
|
86
|
+
rescue_file_error(e)
|
95
87
|
rescue Faraday::SSLError => e # SSL issues are very common
|
96
88
|
handle_ssl_error!(e)
|
97
89
|
rescue Faraday::ConnectionFailed => e
|
98
|
-
|
99
|
-
handle_tls_error!(e)
|
100
|
-
else
|
101
|
-
FastlaneCore::CrashReporter.report_crash(exception: e, action: @program[:name])
|
102
|
-
handle_unknown_error!(e)
|
103
|
-
end
|
90
|
+
rescue_connection_failed_error(e)
|
104
91
|
rescue => e # high chance this is actually FastlaneCore::Interface::FastlaneCrash, but can be anything else
|
105
|
-
|
106
|
-
collector.did_crash(@program[:name])
|
107
|
-
handle_unknown_error!(e)
|
92
|
+
rescue_unknown_error(e)
|
108
93
|
ensure
|
109
94
|
collector.did_finish
|
110
95
|
end
|
111
96
|
end
|
112
97
|
|
98
|
+
def collector
|
99
|
+
@collector ||= FastlaneCore::ToolCollector.new
|
100
|
+
end
|
101
|
+
|
102
|
+
def rescue_file_error(e)
|
103
|
+
# We're also printing the new-lines, as otherwise the message is not very visible in-between the error and the stacktrace
|
104
|
+
puts ""
|
105
|
+
FastlaneCore::UI.important("Error accessing file, this might be due to fastlane's directory handling")
|
106
|
+
FastlaneCore::UI.important("Check out https://docs.fastlane.tools/advanced/#directory-behavior for more details")
|
107
|
+
puts ""
|
108
|
+
FastlaneCore::CrashReporter.report_crash(exception: e, action: @program[:name])
|
109
|
+
raise e
|
110
|
+
end
|
111
|
+
|
112
|
+
def rescue_connection_failed_error(e)
|
113
|
+
if e.message.include? 'Connection reset by peer - SSL_connect'
|
114
|
+
handle_tls_error!(e)
|
115
|
+
else
|
116
|
+
FastlaneCore::CrashReporter.report_crash(exception: e, action: @program[:name])
|
117
|
+
handle_unknown_error!(e)
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
def rescue_unknown_error(e)
|
122
|
+
FastlaneCore::CrashReporter.report_crash(exception: e, action: @program[:name])
|
123
|
+
collector.did_crash(@program[:name]) if e.fastlane_should_report_metrics?
|
124
|
+
handle_unknown_error!(e)
|
125
|
+
end
|
126
|
+
|
127
|
+
def rescue_fastlane_error(e)
|
128
|
+
collector.did_raise_error(@program[:name]) if e.fastlane_should_report_metrics?
|
129
|
+
show_github_issues(e.message) if e.show_github_issues
|
130
|
+
FastlaneCore::CrashReporter.report_crash(exception: e, action: @program[:name])
|
131
|
+
display_user_error!(e, e.message)
|
132
|
+
end
|
133
|
+
|
113
134
|
def handle_tls_error!(e)
|
114
135
|
# Apple has upgraded its iTunes Connect servers to require TLS 1.2, but
|
115
136
|
# system Ruby 2.0 does not support it. We want to suggest that users upgrade
|
data/produce/README.md
CHANGED
@@ -77,31 +77,37 @@ Get in contact with the developers on Twitter: [@FastlaneTools](https://twitter.
|
|
77
77
|
To get a list of all available parameters:
|
78
78
|
|
79
79
|
fastlane produce --help
|
80
|
-
|
80
|
+
|
81
81
|
```
|
82
|
-
Commands:
|
83
|
-
associate_group
|
84
|
-
create Creates a new app on iTunes Connect and the Apple Developer Portal
|
85
|
-
disable_services
|
86
|
-
enable_services
|
87
|
-
group
|
88
|
-
help
|
82
|
+
Commands: (* default)
|
83
|
+
associate_group Associate with a group, which is created if needed or simply located otherwise
|
84
|
+
create * Creates a new app on iTunes Connect and the Apple Developer Portal
|
85
|
+
disable_services Disable specific Application Services for a specific app on the Apple Developer Portal
|
86
|
+
enable_services Enable specific Application Services for a specific app on the Apple Developer Portal
|
87
|
+
group Ensure that a specific App Group exists
|
88
|
+
help Display global or [command] help documentation
|
89
89
|
|
90
90
|
Global Options:
|
91
|
+
--verbose
|
92
|
+
-h, --help Display help documentation
|
93
|
+
-v, --version Display version information
|
94
|
+
|
95
|
+
Options for create:
|
91
96
|
-u, --username STRING Your Apple ID Username (PRODUCE_USERNAME)
|
92
97
|
-a, --app_identifier STRING App Identifier (Bundle ID, e.g. com.krausefx.app) (PRODUCE_APP_IDENTIFIER)
|
93
98
|
-e, --bundle_identifier_suffix STRING App Identifier Suffix (Ignored if App Identifier does not ends with .*) (PRODUCE_APP_IDENTIFIER_SUFFIX)
|
94
99
|
-q, --app_name STRING App Name (PRODUCE_APP_NAME)
|
95
100
|
-z, --app_version STRING Initial version number (e.g. '1.0') (PRODUCE_VERSION)
|
96
101
|
-y, --sku STRING SKU Number (e.g. '1234') (PRODUCE_SKU)
|
102
|
+
-j, --platform STRING The platform to use (optional) (PRODUCE_PLATFORM)
|
97
103
|
-m, --language STRING Primary Language (e.g. 'English', 'German') (PRODUCE_LANGUAGE)
|
98
104
|
-c, --company_name STRING The name of your company. Only required if it's the first app you create (PRODUCE_COMPANY_NAME)
|
99
|
-
-i, --skip_itc
|
100
|
-
-d, --skip_devcenter
|
101
|
-
-b, --team_id STRING The ID of your team if you're in multiple teams (PRODUCE_TEAM_ID)
|
102
|
-
-l, --team_name STRING The name of your team if you're in multiple teams (PRODUCE_TEAM_NAME)
|
103
|
-
-
|
104
|
-
-
|
105
|
+
-i, --skip_itc [VALUE] Skip the creation of the app on iTunes Connect (PRODUCE_SKIP_ITC)
|
106
|
+
-d, --skip_devcenter [VALUE] Skip the creation of the app on the Apple Developer Portal (PRODUCE_SKIP_DEVCENTER)
|
107
|
+
-b, --team_id STRING The ID of your Developer Portal team if you're in multiple teams (PRODUCE_TEAM_ID)
|
108
|
+
-l, --team_name STRING The name of your Developer Portal team if you're in multiple teams (PRODUCE_TEAM_NAME)
|
109
|
+
-k, --itc_team_id [VALUE] The ID of your iTunes Connect team if you're in multiple teams (PRODUCE_ITC_TEAM_ID)
|
110
|
+
-p, --itc_team_name STRING The name of your iTunes Connect team if you're in multiple teams (PRODUCE_ITC_TEAM_NAME)
|
105
111
|
```
|
106
112
|
|
107
113
|
## Enabling / Disabling Application Services
|
@@ -183,6 +189,26 @@ lane :release do
|
|
183
189
|
app_version: '1.0',
|
184
190
|
sku: '123',
|
185
191
|
team_name: 'SunApps GmbH' # only necessary when in multiple teams
|
192
|
+
|
193
|
+
# Optional
|
194
|
+
# App services can be enabled during app creation
|
195
|
+
enable_services: {
|
196
|
+
app_group: "on" # Valid values: "on", "off"
|
197
|
+
apple_pay: "on" # Valid values: "on", "off"
|
198
|
+
associated_domains: "on" # Valid values: "on", "off"
|
199
|
+
data_protection: "complete" # Valid values: "complete", "unlessopen", "untilfirstauth"
|
200
|
+
game_center: "on" # Valid values: "on", "off"
|
201
|
+
health_kit: "on" # Valid values: "on", "off"
|
202
|
+
home_kit: "on" # Valid values: "on", "off"
|
203
|
+
wireless_accessory: "on" # Valid values: "on", "off"
|
204
|
+
icloud: "cloudkit" # Valid values: "legacy", "cloudkit"
|
205
|
+
in_app_purchase: "on" # Valid values: "on", "off"
|
206
|
+
inter_app_audio: "on" # Valid values: "on", "off"
|
207
|
+
passbook: "on" # Valid values: "on", "off"
|
208
|
+
push_notification: "on" # Valid values: "on", "off"
|
209
|
+
siri_kit: "on" # Valid values: "on", "off"
|
210
|
+
vpn_configuration: "on" # Valid values: "on", "off"
|
211
|
+
}
|
186
212
|
)
|
187
213
|
|
188
214
|
deliver
|
@@ -2,6 +2,36 @@ require 'spaceship'
|
|
2
2
|
|
3
3
|
module Produce
|
4
4
|
class DeveloperCenter
|
5
|
+
SERVICE_ON = "on"
|
6
|
+
SERVICE_OFF = "off"
|
7
|
+
SERVICE_COMPLETE = "complete"
|
8
|
+
SERVICE_UNLESS_OPEN = "unlessopen"
|
9
|
+
SERVICE_UNTIL_FIRST_LAUNCH = "untilfirstauth"
|
10
|
+
SERVICE_LEGACY = "legacy"
|
11
|
+
SERVICE_CLOUDKIT = "cloudkit"
|
12
|
+
|
13
|
+
ALLOWED_SERVICES = {
|
14
|
+
app_group: [SERVICE_ON, SERVICE_OFF],
|
15
|
+
apple_pay: [SERVICE_ON, SERVICE_OFF],
|
16
|
+
associated_domains: [SERVICE_ON, SERVICE_OFF],
|
17
|
+
data_protection: [
|
18
|
+
SERVICE_COMPLETE,
|
19
|
+
SERVICE_UNLESS_OPEN,
|
20
|
+
SERVICE_UNTIL_FIRST_LAUNCH
|
21
|
+
],
|
22
|
+
game_center: [SERVICE_ON, SERVICE_OFF],
|
23
|
+
health_kit: [SERVICE_ON, SERVICE_OFF],
|
24
|
+
home_kit: [SERVICE_ON, SERVICE_OFF],
|
25
|
+
wireless_accessory: [SERVICE_ON, SERVICE_OFF],
|
26
|
+
icloud: [SERVICE_LEGACY, SERVICE_CLOUDKIT],
|
27
|
+
in_app_purchase: [SERVICE_ON, SERVICE_OFF],
|
28
|
+
inter_app_audio: [SERVICE_ON, SERVICE_OFF],
|
29
|
+
passbook: [SERVICE_ON, SERVICE_OFF],
|
30
|
+
push_notification: [SERVICE_ON, SERVICE_OFF],
|
31
|
+
siri_kit: [SERVICE_ON, SERVICE_OFF],
|
32
|
+
vpn_configuration: [SERVICE_ON, SERVICE_OFF]
|
33
|
+
}
|
34
|
+
|
5
35
|
def run
|
6
36
|
login
|
7
37
|
create_new_app
|
@@ -19,7 +49,7 @@ module Produce
|
|
19
49
|
|
20
50
|
app = Spaceship.app.create!(bundle_id: app_identifier,
|
21
51
|
name: app_name,
|
22
|
-
|
52
|
+
enable_services: enable_services,
|
23
53
|
mac: Produce.config[:platform] == "osx")
|
24
54
|
|
25
55
|
if app.name != Produce.config[:app_name]
|
@@ -40,30 +70,34 @@ module Produce
|
|
40
70
|
return true
|
41
71
|
end
|
42
72
|
|
43
|
-
def
|
73
|
+
def enable_services
|
44
74
|
app_service = Spaceship.app_service
|
45
75
|
enabled_clean_options = {}
|
46
|
-
|
76
|
+
|
77
|
+
# "enable_services" was deprecated in favor of "enable_services"
|
78
|
+
config_enabled_services = Produce.config[:enable_services] || Produce.config[:enable_services]
|
79
|
+
|
80
|
+
config_enabled_services.each do |k, v|
|
47
81
|
if k.to_sym == :data_protection
|
48
82
|
case v
|
49
|
-
when
|
83
|
+
when SERVICE_COMPLETE
|
50
84
|
enabled_clean_options[app_service.data_protection.complete.service_id] = app_service.data_protection.complete
|
51
|
-
when
|
85
|
+
when SERVICE_UNLESS_OPEN
|
52
86
|
enabled_clean_options[app_service.data_protection.unlessopen.service_id] = app_service.data_protection.unlessopen
|
53
|
-
when
|
87
|
+
when SERVICE_UNTIL_FIRST_LAUNCH
|
54
88
|
enabled_clean_options[app_service.data_protection.untilfirstauth.service_id] = app_service.data_protection.untilfirstauth
|
55
89
|
end
|
56
90
|
elsif k.to_sym == :icloud
|
57
91
|
case v
|
58
|
-
when
|
92
|
+
when SERVICE_LEGACY
|
59
93
|
enabled_clean_options[app_service.icloud.on.service_id] = app_service.icloud.on
|
60
94
|
enabled_clean_options[app_service.cloud_kit.xcode5_compatible.service_id] = app_service.cloud_kit.xcode5_compatible
|
61
|
-
when
|
95
|
+
when SERVICE_CLOUDKIT
|
62
96
|
enabled_clean_options[app_service.icloud.on.service_id] = app_service.icloud.on
|
63
97
|
enabled_clean_options[app_service.cloud_kit.cloud_kit.service_id] = app_service.cloud_kit.cloud_kit
|
64
98
|
end
|
65
99
|
else
|
66
|
-
if v ==
|
100
|
+
if v == SERVICE_ON
|
67
101
|
enabled_clean_options[app_service.send(k.to_s).on.service_id] = app_service.send(k.to_s).on
|
68
102
|
else
|
69
103
|
enabled_clean_options[app_service.send(k.to_s).off.service_id] = app_service.send(k.to_s).off
|
@@ -66,20 +66,34 @@ module Produce
|
|
66
66
|
is_string: false,
|
67
67
|
default_value: false),
|
68
68
|
|
69
|
+
# Deprecating this in favor of a rename from "enabled_features" to "enable_services"
|
69
70
|
FastlaneCore::ConfigItem.new(key: :enabled_features,
|
70
|
-
|
71
|
+
deprecated: "Please use `enable_services` instead",
|
72
|
+
display_in_shell: false,
|
71
73
|
env_name: "PRODUCE_ENABLED_FEATURES",
|
72
|
-
description: "Array with Spaceship App
|
74
|
+
description: "Array with Spaceship App Services",
|
73
75
|
is_string: false,
|
74
76
|
default_value: {},
|
75
77
|
verify_block: proc do |value|
|
76
|
-
allowed_keys =
|
77
|
-
:wireless_accessory, :icloud, :in_app_purchase, :inter_app_audio, :passbook, :push_notification, :siri_kit, :vpn_configuration]
|
78
|
+
allowed_keys = Produce::DeveloperCenter::ALLOWED_SERVICES.keys
|
78
79
|
UI.user_error!("enabled_features has to be of type Hash") unless value.kind_of?(Hash)
|
79
80
|
value.each do |key, v|
|
80
81
|
UI.user_error!("The key: '#{key}' is not supported in `enabled_features' - following keys are available: [#{allowed_keys.join(',')}]") unless allowed_keys.include? key.to_sym
|
81
82
|
end
|
82
83
|
end),
|
84
|
+
FastlaneCore::ConfigItem.new(key: :enable_services,
|
85
|
+
display_in_shell: false,
|
86
|
+
env_name: "PRODUCE_ENABLE_SERVICES",
|
87
|
+
description: "Array with Spaceship App Services (e.g. #{allowed_services_description})",
|
88
|
+
is_string: false,
|
89
|
+
default_value: {},
|
90
|
+
verify_block: proc do |value|
|
91
|
+
allowed_keys = Produce::DeveloperCenter::ALLOWED_SERVICES.keys
|
92
|
+
UI.user_error!("enable_services has to be of type Hash") unless value.kind_of?(Hash)
|
93
|
+
value.each do |key, v|
|
94
|
+
UI.user_error!("The key: '#{key}' is not supported in `enable_services' - following keys are available: [#{allowed_keys.join(',')}]") unless allowed_keys.include? key.to_sym
|
95
|
+
end
|
96
|
+
end),
|
83
97
|
|
84
98
|
FastlaneCore::ConfigItem.new(key: :skip_devcenter,
|
85
99
|
short_option: "-d",
|
@@ -126,5 +140,11 @@ module Produce
|
|
126
140
|
end)
|
127
141
|
]
|
128
142
|
end
|
143
|
+
|
144
|
+
def self.allowed_services_description
|
145
|
+
return Produce::DeveloperCenter::ALLOWED_SERVICES.map do |k, v|
|
146
|
+
"#{k}: (#{v.join('|')})"
|
147
|
+
end.join(", ")
|
148
|
+
end
|
129
149
|
end
|
130
150
|
end
|
@@ -33,8 +33,8 @@ module Spaceship
|
|
33
33
|
# @return (Hash) Feature details
|
34
34
|
attr_accessor :features
|
35
35
|
|
36
|
-
# @return (Array) List of enabled
|
37
|
-
attr_accessor :
|
36
|
+
# @return (Array) List of enabled services
|
37
|
+
attr_accessor :enable_services
|
38
38
|
|
39
39
|
# @return (Bool) Development Push Enabled?
|
40
40
|
attr_accessor :dev_push_enabled
|
@@ -62,7 +62,7 @@ module Spaceship
|
|
62
62
|
'identifier' => :bundle_id,
|
63
63
|
'isWildCard' => :is_wildcard,
|
64
64
|
'features' => :features,
|
65
|
-
'enabledFeatures' => :
|
65
|
+
'enabledFeatures' => :enable_services,
|
66
66
|
'isDevPushEnabled' => :dev_push_enabled,
|
67
67
|
'isProdPushEnabled' => :prod_push_enabled,
|
68
68
|
'associatedApplicationGroupsCount' => :app_groups_count,
|
@@ -92,14 +92,14 @@ module Spaceship
|
|
92
92
|
# @param name [String] the name of the App
|
93
93
|
# @param mac [Bool] is this a Mac app?
|
94
94
|
# @return (App) The app you just created
|
95
|
-
def create!(bundle_id: nil, name: nil, mac: false,
|
95
|
+
def create!(bundle_id: nil, name: nil, mac: false, enable_services: {})
|
96
96
|
if bundle_id.end_with?('*')
|
97
97
|
type = :wildcard
|
98
98
|
else
|
99
99
|
type = :explicit
|
100
100
|
end
|
101
101
|
|
102
|
-
new_app = client.create_app!(type, name, bundle_id, mac: mac,
|
102
|
+
new_app = client.create_app!(type, name, bundle_id, mac: mac, enable_services: enable_services)
|
103
103
|
self.new(new_app)
|
104
104
|
end
|
105
105
|
|
@@ -144,7 +144,7 @@ module Spaceship
|
|
144
144
|
latinized
|
145
145
|
end
|
146
146
|
|
147
|
-
def create_app!(type, name, bundle_id, mac: false,
|
147
|
+
def create_app!(type, name, bundle_id, mac: false, enable_services: {})
|
148
148
|
# We moved the ensure_csrf to the top of this method
|
149
149
|
# as we got some users with issues around creating new apps
|
150
150
|
# https://github.com/fastlane/fastlane/issues/5813
|
@@ -171,7 +171,7 @@ module Spaceship
|
|
171
171
|
teamId: team_id
|
172
172
|
}
|
173
173
|
params.merge!(ident_params)
|
174
|
-
|
174
|
+
enable_services.each do |k, v|
|
175
175
|
params[v.service_id.to_sym] = v.value
|
176
176
|
end
|
177
177
|
r = request(:post, "account/#{platform_slug(mac)}/identifiers/addAppId.action", params)
|
@@ -26,7 +26,7 @@ module Supply
|
|
26
26
|
description: "The percentage of the user fraction when uploading to the rollout track",
|
27
27
|
default_value: '0.1',
|
28
28
|
verify_block: proc do |value|
|
29
|
-
min = 0.
|
29
|
+
min = 0.01
|
30
30
|
max = 0.5
|
31
31
|
UI.user_error! "Invalid value '#{value}', must be between #{min} and #{max}" unless value.to_f.between?(min, max)
|
32
32
|
end),
|
@@ -41,7 +41,7 @@ module Supply
|
|
41
41
|
def promote_track
|
42
42
|
version_codes = client.track_version_codes(Supply.config[:track])
|
43
43
|
# the actual value passed for the rollout argument does not matter because it will be ignored by the Google Play API
|
44
|
-
# but it has to be between 0.
|
44
|
+
# but it has to be between 0.01 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
46
|
client.update_track(Supply.config[:track_promote_to], Supply.config[:rollout], version_codes)
|
47
47
|
end
|
@@ -162,8 +162,12 @@ module Supply
|
|
162
162
|
end
|
163
163
|
end
|
164
164
|
|
165
|
+
# returns only language directories from metadata_path
|
165
166
|
def all_languages
|
166
|
-
Dir.
|
167
|
+
Dir.entries(metadata_path)
|
168
|
+
.select { |f| File.directory? File.join(metadata_path, f) }
|
169
|
+
.reject { |f| f.start_with?('.') }
|
170
|
+
.sort { |x, y| x <=> y }
|
167
171
|
end
|
168
172
|
|
169
173
|
def client
|
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.36.0.beta.
|
4
|
+
version: 2.36.0.beta.20170531010050
|
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-05-
|
18
|
+
date: 2017-05-31 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: slack-notifier
|
@@ -1368,23 +1368,23 @@ metadata:
|
|
1368
1368
|
post_install_message:
|
1369
1369
|
rdoc_options: []
|
1370
1370
|
require_paths:
|
1371
|
-
- cert/lib
|
1372
|
-
- pem/lib
|
1373
|
-
- scan/lib
|
1374
|
-
- frameit/lib
|
1375
1371
|
- fastlane_core/lib
|
1376
|
-
-
|
1372
|
+
- match/lib
|
1377
1373
|
- fastlane/lib
|
1378
|
-
- sigh/lib
|
1379
|
-
- spaceship/lib
|
1380
1374
|
- gym/lib
|
1381
|
-
-
|
1382
|
-
- snapshot/lib
|
1383
|
-
- produce/lib
|
1384
|
-
- pilot/lib
|
1375
|
+
- scan/lib
|
1385
1376
|
- screengrab/lib
|
1377
|
+
- pem/lib
|
1378
|
+
- snapshot/lib
|
1379
|
+
- spaceship/lib
|
1380
|
+
- sigh/lib
|
1381
|
+
- cert/lib
|
1386
1382
|
- deliver/lib
|
1383
|
+
- credentials_manager/lib
|
1384
|
+
- produce/lib
|
1385
|
+
- frameit/lib
|
1387
1386
|
- supply/lib
|
1387
|
+
- pilot/lib
|
1388
1388
|
required_ruby_version: !ruby/object:Gem::Requirement
|
1389
1389
|
requirements:
|
1390
1390
|
- - ">="
|