fastlane 2.55.0.beta.20170830010003 → 2.55.0.beta.20170831010002
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +1 -1
- data/fastlane/lib/fastlane/actions/hipchat.rb +5 -2
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/gym/lib/gym/error_handler.rb +11 -0
- data/match/lib/match/generator.rb +2 -1
- data/match/lib/match/options.rb +6 -1
- data/pilot/lib/pilot/tester_exporter.rb +1 -1
- data/pilot/lib/pilot/tester_manager.rb +2 -2
- data/pilot/lib/pilot/tester_util.rb +0 -7
- data/sigh/lib/sigh/options.rb +6 -1
- data/sigh/lib/sigh/runner.rb +2 -1
- data/spaceship/lib/spaceship/portal/portal.rb +1 -0
- data/spaceship/lib/spaceship/portal/portal_client.rb +7 -2
- data/spaceship/lib/spaceship/portal/provisioning_profile.rb +62 -4
- data/spaceship/lib/spaceship/portal/provisioning_profile_template.rb +50 -0
- data/spaceship/lib/spaceship/tunes/tester.rb +7 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbd1f07885621ab5d9da93acfaf2b7026ea1c39a
|
4
|
+
data.tar.gz: 5d954d4b3ff216291b0aa56bdfcb7c8c6248351a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce9a253250d1f57940480cd5c8f6cb8f481ef4bf6d090b32f87913ef88cb1466e608ad57e155444bd59c8bd1b777a39639f63896856cb3594a10db5394c4d834
|
7
|
+
data.tar.gz: 93cc5eaa182601e867dd9c5ece6d044d84b79af321d317acdc711ba4257e56a131bf42a2bcd1d365edd1f90262b5ab4befeeb3ceecb98566f672b1c2bbfe795d
|
@@ -30,7 +30,7 @@ module Fastlane
|
|
30
30
|
if testflight_version
|
31
31
|
version_number = testflight_version
|
32
32
|
else
|
33
|
-
version_number = UI.input("You have to specify a new version number")
|
33
|
+
version_number = UI.input("You have to specify a new version number, as there are multiple to choose from")
|
34
34
|
end
|
35
35
|
|
36
36
|
end
|
@@ -46,19 +46,22 @@ module Fastlane
|
|
46
46
|
end
|
47
47
|
else
|
48
48
|
########## running on V2 ##########
|
49
|
+
# Escape channel's name to guarantee it is a valid URL resource.
|
50
|
+
# First of all we verify that the value is not already escaped,
|
51
|
+
# escaping an escaped value will produce a wrong channel name.
|
52
|
+
escaped_channel = URI.unescape(channel) == channel ? URI.escape(channel) : channel
|
49
53
|
if user?(channel)
|
50
54
|
params = { 'message' => message, 'message_format' => message_format }
|
51
55
|
json_headers = { 'Content-Type' => 'application/json',
|
52
56
|
'Accept' => 'application/json', 'Authorization' => "Bearer #{api_token}" }
|
53
57
|
|
54
|
-
escaped_channel = URI.unescape(channel) == channel ? URI.escape(channel) : channel
|
55
58
|
uri = URI.parse("https://#{api_host}/v2/user/#{escaped_channel}/message")
|
56
59
|
http = Net::HTTP.new(uri.host, uri.port)
|
57
60
|
http.use_ssl = true
|
58
61
|
|
59
62
|
response = http.post(uri.path, params.to_json, json_headers)
|
60
63
|
else
|
61
|
-
uri = URI.parse("https://#{api_host}/v2/room/#{
|
64
|
+
uri = URI.parse("https://#{api_host}/v2/room/#{escaped_channel}/notification")
|
62
65
|
response = Net::HTTP.post_form(uri, { 'from' => from,
|
63
66
|
'auth_token' => api_token,
|
64
67
|
'color' => color,
|
@@ -56,6 +56,17 @@ module Gym
|
|
56
56
|
print_full_log_path
|
57
57
|
print_environment_information
|
58
58
|
print_build_error_instructions
|
59
|
+
|
60
|
+
# This error is rather common and should be below the other (a little noisy) output
|
61
|
+
case output
|
62
|
+
when /Code signing is required for product/
|
63
|
+
print "Seems like Xcode is not happy with the code signing setup"
|
64
|
+
print "Please make sure to check out the raw `xcodebuild` output"
|
65
|
+
UI.important(Gym::BuildCommandGenerator.xcodebuild_log_path)
|
66
|
+
print "The very bottom of the file will tell you the raw Xcode error message"
|
67
|
+
print "indicating on why the code signing step failed"
|
68
|
+
end
|
69
|
+
|
59
70
|
UI.build_failure!("Error building the application - see the log above", error_info: output)
|
60
71
|
end
|
61
72
|
|
@@ -55,7 +55,8 @@ module Match
|
|
55
55
|
cert_id: certificate_id,
|
56
56
|
provisioning_name: profile_name,
|
57
57
|
ignore_profiles_with_different_name: true,
|
58
|
-
team_id: params[:team_id]
|
58
|
+
team_id: params[:team_id],
|
59
|
+
template_name: params[:template_name]
|
59
60
|
}
|
60
61
|
|
61
62
|
values[:platform] = params[:platform]
|
data/match/lib/match/options.rb
CHANGED
@@ -143,7 +143,12 @@ module Match
|
|
143
143
|
value = value.to_s
|
144
144
|
pt = %w(tvos ios)
|
145
145
|
UI.user_error!("Unsupported platform, must be: #{pt}") unless pt.include?(value)
|
146
|
-
end)
|
146
|
+
end),
|
147
|
+
FastlaneCore::ConfigItem.new(key: :template_name,
|
148
|
+
env_name: "MATCH_PROVISIONING_PROFILE_TEMPLATE_NAME",
|
149
|
+
description: "The name of provisioning profile template. If the developer account has provisioning profile templates, template name can be found by inspecting the Entitlements drop-down while creating/editing a provisioning profile",
|
150
|
+
optional: true,
|
151
|
+
default_value: nil)
|
147
152
|
]
|
148
153
|
end
|
149
154
|
end
|
@@ -24,7 +24,7 @@ module Pilot
|
|
24
24
|
|
25
25
|
testers.each do |tester|
|
26
26
|
group_names = tester.groups_list(';') || ""
|
27
|
-
install_version = tester.
|
27
|
+
install_version = tester.latest_build || ""
|
28
28
|
pretty_date = tester.pretty_install_date || ""
|
29
29
|
|
30
30
|
csv << [tester.first_name, tester.last_name, tester.email, group_names, tester.devices.count, install_version, pretty_date]
|
@@ -204,7 +204,7 @@ module Pilot
|
|
204
204
|
tester.email,
|
205
205
|
tester.groups_list,
|
206
206
|
tester.devices.count,
|
207
|
-
tester.
|
207
|
+
tester.latest_build,
|
208
208
|
tester.pretty_install_date
|
209
209
|
]
|
210
210
|
end
|
@@ -249,7 +249,7 @@ module Pilot
|
|
249
249
|
end
|
250
250
|
|
251
251
|
if tester.latest_install_date
|
252
|
-
rows << ["Latest Version", tester.
|
252
|
+
rows << ["Latest Version", tester.latest_build]
|
253
253
|
rows << ["Latest Install Date", tester.pretty_install_date]
|
254
254
|
end
|
255
255
|
|
@@ -7,13 +7,6 @@ module Spaceship
|
|
7
7
|
# monkey patched
|
8
8
|
# move this to spaceship
|
9
9
|
class Tester < TunesBase
|
10
|
-
def full_version
|
11
|
-
return nil unless latest_install_date
|
12
|
-
latest_installed_version = latest_installed_version_number
|
13
|
-
latest_installed_short_version = latest_installed_build_number
|
14
|
-
"#{latest_installed_version} (#{latest_installed_short_version})"
|
15
|
-
end
|
16
|
-
|
17
10
|
def pretty_install_date
|
18
11
|
return nil unless latest_install_date
|
19
12
|
Time.at((latest_install_date / 1000)).strftime("%m/%d/%y %H:%M")
|
data/sigh/lib/sigh/options.rb
CHANGED
@@ -121,7 +121,12 @@ module Sigh
|
|
121
121
|
value = value.to_s
|
122
122
|
pt = %w(macos tvos ios)
|
123
123
|
UI.user_error!("Unsupported platform, must be: #{pt}") unless pt.include?(value)
|
124
|
-
end)
|
124
|
+
end),
|
125
|
+
FastlaneCore::ConfigItem.new(key: :template_name,
|
126
|
+
env_name: "SIGH_PROVISIONING_PROFILE_TEMPLATE_NAME",
|
127
|
+
description: "The name of provisioning profile template. If the developer account has provisioning profile templates, template name can be found by inspecting the Entitlements drop-down while creating/editing a provisioning profile",
|
128
|
+
optional: true,
|
129
|
+
default_value: nil)
|
125
130
|
]
|
126
131
|
end
|
127
132
|
end
|
data/sigh/lib/sigh/runner.rb
CHANGED
@@ -137,7 +137,8 @@ module Sigh
|
|
137
137
|
bundle_id: bundle_id,
|
138
138
|
certificate: cert,
|
139
139
|
mac: Sigh.config[:platform].to_s == 'macos',
|
140
|
-
sub_platform: Sigh.config[:platform].to_s == 'tvos' ? 'tvOS' : nil
|
140
|
+
sub_platform: Sigh.config[:platform].to_s == 'tvos' ? 'tvOS' : nil,
|
141
|
+
template_name: Sigh.config[:template_name])
|
141
142
|
profile
|
142
143
|
end
|
143
144
|
|
@@ -10,6 +10,7 @@ require 'spaceship/portal/portal_client'
|
|
10
10
|
require 'spaceship/portal/persons'
|
11
11
|
require 'spaceship/portal/person'
|
12
12
|
require 'spaceship/portal/key'
|
13
|
+
require 'spaceship/portal/provisioning_profile_template'
|
13
14
|
require 'spaceship/portal/merchant'
|
14
15
|
require 'spaceship/portal/passbook'
|
15
16
|
require 'spaceship/portal/invite'
|
@@ -588,7 +588,7 @@ module Spaceship
|
|
588
588
|
parse_response(r, 'provisioningProfile')
|
589
589
|
end
|
590
590
|
|
591
|
-
def create_provisioning_profile!(name, distribution_method, app_id, certificate_ids, device_ids, mac: false, sub_platform: nil)
|
591
|
+
def create_provisioning_profile!(name, distribution_method, app_id, certificate_ids, device_ids, mac: false, sub_platform: nil, template_name: nil)
|
592
592
|
ensure_csrf(Spaceship::ProvisioningProfile) do
|
593
593
|
fetch_csrf_token_for_provisioning
|
594
594
|
end
|
@@ -603,6 +603,9 @@ module Spaceship
|
|
603
603
|
}
|
604
604
|
params[:subPlatform] = sub_platform if sub_platform
|
605
605
|
|
606
|
+
# if `template_name` is nil, Default entitlements will be used
|
607
|
+
params[:template] = template_name if template_name
|
608
|
+
|
606
609
|
r = request(:post, "account/#{platform_slug(mac)}/profile/createProvisioningProfile.action", params)
|
607
610
|
parse_response(r, 'provisioningProfile')
|
608
611
|
end
|
@@ -636,7 +639,7 @@ module Spaceship
|
|
636
639
|
parse_response(r)
|
637
640
|
end
|
638
641
|
|
639
|
-
def repair_provisioning_profile!(profile_id, name, distribution_method, app_id, certificate_ids, device_ids, mac: false, sub_platform: nil)
|
642
|
+
def repair_provisioning_profile!(profile_id, name, distribution_method, app_id, certificate_ids, device_ids, mac: false, sub_platform: nil, template_name: nil)
|
640
643
|
ensure_csrf(Spaceship::ProvisioningProfile) do
|
641
644
|
fetch_csrf_token_for_provisioning
|
642
645
|
end
|
@@ -651,6 +654,8 @@ module Spaceship
|
|
651
654
|
deviceIds: device_ids
|
652
655
|
}
|
653
656
|
params[:subPlatform] = sub_platform if sub_platform
|
657
|
+
# if `template_name` is nil, Default entitlements will be used
|
658
|
+
params[:template] = template_name if template_name
|
654
659
|
|
655
660
|
r = request(:post, "account/#{platform_slug(mac)}/profile/regenProvisioningProfile.action", params)
|
656
661
|
|
@@ -134,6 +134,29 @@ module Spaceship
|
|
134
134
|
# more information on this issue https://github.com/fastlane/fastlane/issues/6137
|
135
135
|
attr_accessor :profile_details
|
136
136
|
|
137
|
+
# @return (Bool) Does the profile use a template (has extended entitlements)?
|
138
|
+
#
|
139
|
+
# @example
|
140
|
+
# false
|
141
|
+
attr_accessor :is_template_profile
|
142
|
+
|
143
|
+
# @return (Spaceship::Portal::ProvisioningProfileTemplate)
|
144
|
+
# Model representation of the provisioning profile template.
|
145
|
+
# This will be always nil if is_template_profile returns false
|
146
|
+
#
|
147
|
+
# @example Example Value
|
148
|
+
# <Spaceship::Portal::ProvisioningProfileTemplate
|
149
|
+
# @template_description="Subscription Service iOS (dist)",
|
150
|
+
# @entitlements=nil,
|
151
|
+
# @purpose_description="Generic Provisioning Profile Template for App: com.apple.smoot.subscriptionservice",
|
152
|
+
# @purpose_display_name="Subscription Service iOS (dist)",
|
153
|
+
# @purpose_name="Subscription Service iOS (dist)",
|
154
|
+
# @version=1>
|
155
|
+
#
|
156
|
+
# @example Usage
|
157
|
+
# profile.template.purpose_display_name
|
158
|
+
attr_accessor :template
|
159
|
+
|
137
160
|
attr_mapping({
|
138
161
|
'provisioningProfileId' => :id,
|
139
162
|
'UUID' => :uuid,
|
@@ -146,7 +169,9 @@ module Spaceship
|
|
146
169
|
'proProPlatform' => :platform,
|
147
170
|
'proProSubPlatform' => :sub_platform,
|
148
171
|
'managingApp' => :managing_app,
|
149
|
-
'appId' => :app
|
172
|
+
'appId' => :app,
|
173
|
+
'isTemplateProfile' => :is_template_profile,
|
174
|
+
'template' => :template
|
150
175
|
})
|
151
176
|
|
152
177
|
class << self
|
@@ -182,6 +207,18 @@ module Spaceship
|
|
182
207
|
attrs['dateExpire'] = (Time.parse(attrs['dateExpire']) rescue attrs['dateExpire'])
|
183
208
|
# rubocop:enable Style/RescueModifier
|
184
209
|
|
210
|
+
# When a profile is created with a template name, the response
|
211
|
+
# (provisioning profiles info) already contains the data about
|
212
|
+
# template, which is used to instantiate the
|
213
|
+
# ProvisioningProfileTemplate model.
|
214
|
+
# Doing so saves an API call needed to fetch profile details.
|
215
|
+
#
|
216
|
+
# Verify if `attrs` contains the info needed to instantiate a template.
|
217
|
+
# If not, the template will be lazily loaded.
|
218
|
+
if attrs['profile'] && attrs['profile']['description']
|
219
|
+
attrs['template'] = ProvisioningProfileTemplate.factory(attrs['template'])
|
220
|
+
end
|
221
|
+
|
185
222
|
klass.client = @client
|
186
223
|
obj = klass.new(attrs)
|
187
224
|
|
@@ -209,8 +246,11 @@ module Spaceship
|
|
209
246
|
# and Development profiles and add none for AppStore and Enterprise Profiles
|
210
247
|
# @param mac (Bool) (optional): Pass true if you're making a Mac provisioning profile
|
211
248
|
# @param sub_platform (String) Used to create tvOS profiles at the moment. Value should equal 'tvOS' or nil.
|
249
|
+
# @param template_name (String) (optional): The name of the provisioning profile template.
|
250
|
+
# The value can be found by inspecting the Entitlements drop-down when creating/editing a
|
251
|
+
# provisioning profile in Developer Portal.
|
212
252
|
# @return (ProvisioningProfile): The profile that was just created
|
213
|
-
def create!(name: nil, bundle_id: nil, certificate: nil, devices: [], mac: false, sub_platform: nil)
|
253
|
+
def create!(name: nil, bundle_id: nil, certificate: nil, devices: [], mac: false, sub_platform: nil, template_name: nil)
|
214
254
|
raise "Missing required parameter 'bundle_id'" if bundle_id.to_s.empty?
|
215
255
|
raise "Missing required parameter 'certificate'. e.g. use `Spaceship::Certificate::Production.all.first`" if certificate.to_s.empty?
|
216
256
|
|
@@ -253,7 +293,8 @@ module Spaceship
|
|
253
293
|
certificate_parameter,
|
254
294
|
devices.map(&:id),
|
255
295
|
mac: mac,
|
256
|
-
sub_platform: sub_platform
|
296
|
+
sub_platform: sub_platform,
|
297
|
+
template_name: template_name)
|
257
298
|
end
|
258
299
|
|
259
300
|
self.new(profile)
|
@@ -423,7 +464,8 @@ module Spaceship
|
|
423
464
|
certificates.map(&:id),
|
424
465
|
devices.map(&:id),
|
425
466
|
mac: mac?,
|
426
|
-
sub_platform: tvos? ? 'tvOS' : nil
|
467
|
+
sub_platform: tvos? ? 'tvOS' : nil,
|
468
|
+
template_name: template_name
|
427
469
|
)
|
428
470
|
end
|
429
471
|
|
@@ -512,6 +554,22 @@ module Spaceship
|
|
512
554
|
# see https://github.com/fastlane/fastlane/issues/6137 for more information
|
513
555
|
@profile_details ||= client.provisioning_profile_details(provisioning_profile_id: self.id, mac: mac?)
|
514
556
|
end
|
557
|
+
|
558
|
+
# Lazily instantiates the provisioning profile template model
|
559
|
+
#
|
560
|
+
# @return (Bool) The template model if the provisioning profile has a
|
561
|
+
# template or nil if provisioning profile doesn't have a template
|
562
|
+
def template
|
563
|
+
return nil unless is_template_profile
|
564
|
+
|
565
|
+
@template ||= ProvisioningProfileTemplate.factory(profile_details['template'])
|
566
|
+
end
|
567
|
+
|
568
|
+
# @return (String) The name of the template (as displayed in Dev Portal)
|
569
|
+
# or nil if provisioning profile doesn't have a template
|
570
|
+
def template_name
|
571
|
+
is_template_profile ? template.purpose_display_name : nil
|
572
|
+
end
|
515
573
|
end
|
516
574
|
end
|
517
575
|
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
module Spaceship
|
2
|
+
module Portal
|
3
|
+
class ProvisioningProfileTemplate < PortalBase
|
4
|
+
##
|
5
|
+
# Data model representing a provisioning profile template
|
6
|
+
|
7
|
+
# @return (String) Template's description
|
8
|
+
# @example
|
9
|
+
# "Subscription Service iOS (dist)"
|
10
|
+
attr_accessor :template_description
|
11
|
+
|
12
|
+
# @return (String) Template's purpose description
|
13
|
+
# @example
|
14
|
+
# "Generic Provisioning Profile Template for App: com.apple.smoot.subscriptionservice"
|
15
|
+
attr_accessor :purpose_description
|
16
|
+
|
17
|
+
# @return (String) Template's purpose name displayed in Dev Portal
|
18
|
+
# @example
|
19
|
+
# "Subscription Service iOS (dist)"
|
20
|
+
attr_accessor :purpose_display_name
|
21
|
+
|
22
|
+
# @return (String) Template's purpose name
|
23
|
+
# @example
|
24
|
+
# "Subscription Service iOS (dist)"
|
25
|
+
attr_accessor :purpose_name
|
26
|
+
|
27
|
+
# @return (String) Template version
|
28
|
+
# @example
|
29
|
+
# "1"
|
30
|
+
attr_accessor :version
|
31
|
+
|
32
|
+
# @return (Array) A list of extended entitlement IDs defined by the template
|
33
|
+
# This is almost always nil :shrug_emoticon:
|
34
|
+
# @example
|
35
|
+
# nil
|
36
|
+
# @example
|
37
|
+
# ["com.apple.smoot.subscriptionservice"]
|
38
|
+
attr_accessor :entitlements
|
39
|
+
|
40
|
+
attr_mapping({
|
41
|
+
'description' => :template_description,
|
42
|
+
'purposeDescription' => :purpose_description,
|
43
|
+
'purposeDisplayName' => :purpose_display_name,
|
44
|
+
'purposeName' => :purpose_name,
|
45
|
+
'version' => :version,
|
46
|
+
'entitlements' => :entitlements
|
47
|
+
})
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -55,6 +55,9 @@ module Spaceship
|
|
55
55
|
# @return [Integer] The version number of the last installed build
|
56
56
|
attr_accessor :latest_installed_version_number
|
57
57
|
|
58
|
+
# @return [String] The full version of the last installed build
|
59
|
+
attr_accessor :latest_build
|
60
|
+
|
58
61
|
attr_mapping(
|
59
62
|
'testerId' => :tester_id,
|
60
63
|
'emailAddress.value' => :email,
|
@@ -63,9 +66,10 @@ module Spaceship
|
|
63
66
|
'groups' => :groups,
|
64
67
|
'devices' => :devices,
|
65
68
|
'latestInstalledAppAdamId' => :latest_install_app_id,
|
66
|
-
'
|
67
|
-
'
|
68
|
-
'
|
69
|
+
'latestInstallByPlatform.ios.installDate' => :latest_install_date,
|
70
|
+
'latestInstallByPlatform.ios.shortVersion' => :latest_installed_version_number,
|
71
|
+
'latestInstallByPlatform.ios.version' => :latest_installed_build_number,
|
72
|
+
'latestBuild' => :latest_build
|
69
73
|
)
|
70
74
|
|
71
75
|
class << self
|
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.55.0.beta.
|
4
|
+
version: 2.55.0.beta.20170831010002
|
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-08-
|
18
|
+
date: 2017-08-31 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: slack-notifier
|
@@ -1350,6 +1350,7 @@ files:
|
|
1350
1350
|
- spaceship/lib/spaceship/portal/portal_base.rb
|
1351
1351
|
- spaceship/lib/spaceship/portal/portal_client.rb
|
1352
1352
|
- spaceship/lib/spaceship/portal/provisioning_profile.rb
|
1353
|
+
- spaceship/lib/spaceship/portal/provisioning_profile_template.rb
|
1353
1354
|
- spaceship/lib/spaceship/portal/spaceship.rb
|
1354
1355
|
- spaceship/lib/spaceship/portal/ui/select_team.rb
|
1355
1356
|
- spaceship/lib/spaceship/portal/website_push.rb
|