pilot 1.12.1 → 1.13.0
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/README.md +1 -1
- data/lib/pilot/build_manager.rb +23 -12
- data/lib/pilot/commands_generator.rb +1 -0
- data/lib/pilot/manager.rb +11 -0
- data/lib/pilot/options.rb +8 -0
- data/lib/pilot/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 804c9d896ba3e463dfaaa31b5fd0c9994eec340a
|
4
|
+
data.tar.gz: ce1afba1c0d21d6a24d1eb80e9f147156af30d35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 508073bb23adeaaa18bde075010097a549d4c5053afdc9fcffd5bb5cfbd967ae959b70ab1165c43aceafa8da0474ab585f2ce9c6a4d3fda3090a316fc983f7b1
|
7
|
+
data.tar.gz: 924a064ba540ac1983d75b7606d6b6ff71d31be9083022918854057a4c2a424cbeb8a460f7e246d49800cc4e01d3157dc423f49ac358af9007c9a21943f0ac7e
|
data/README.md
CHANGED
@@ -258,7 +258,7 @@ If you run into any issues you can use the `verbose` mode to get a more detailed
|
|
258
258
|
DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS="-t DAV" pilot ...
|
259
259
|
```
|
260
260
|
|
261
|
-
If you are using `pilot` via the [fastlane action](https://
|
261
|
+
If you are using `pilot` via the [fastlane action](https://docs.fastlane.tools/actions#pilot), add the following to your `Fastfile`
|
262
262
|
|
263
263
|
```
|
264
264
|
ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"] = "-t DAV"
|
data/lib/pilot/build_manager.rb
CHANGED
@@ -3,13 +3,13 @@ module Pilot
|
|
3
3
|
def upload(options)
|
4
4
|
start(options)
|
5
5
|
|
6
|
+
options[:changelog] = self.class.truncate_changelog(options[:changelog]) if options[:changelog]
|
7
|
+
|
6
8
|
UI.user_error!("No ipa file given") unless config[:ipa]
|
7
9
|
|
8
10
|
UI.success("Ready to upload new build to TestFlight (App: #{app.apple_id})...")
|
9
11
|
|
10
|
-
|
11
|
-
platform = plist["DTPlatformName"]
|
12
|
-
platform = "ios" if platform == "iphoneos" # via https://github.com/fastlane/spaceship/issues/247
|
12
|
+
platform = fetch_app_platform
|
13
13
|
package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate(app_id: app.apple_id,
|
14
14
|
ipa_path: config[:ipa],
|
15
15
|
package_path: "/tmp",
|
@@ -31,7 +31,7 @@ module Pilot
|
|
31
31
|
end
|
32
32
|
|
33
33
|
UI.message("If you want to skip waiting for the processing to be finished, use the `skip_waiting_for_build_processing` option")
|
34
|
-
uploaded_build = wait_for_processing_build(options) # this might take a while
|
34
|
+
uploaded_build = wait_for_processing_build(options, platform) # this might take a while
|
35
35
|
|
36
36
|
distribute(options, uploaded_build)
|
37
37
|
end
|
@@ -43,7 +43,8 @@ module Pilot
|
|
43
43
|
end
|
44
44
|
|
45
45
|
if build.nil?
|
46
|
-
|
46
|
+
platform = fetch_app_platform(required: false)
|
47
|
+
builds = app.all_processing_builds(platform: platform) + app.builds(platform: platform)
|
47
48
|
# sort by upload_date
|
48
49
|
builds.sort! { |a, b| a.upload_date <=> b.upload_date }
|
49
50
|
build = builds.last
|
@@ -81,7 +82,8 @@ module Pilot
|
|
81
82
|
config[:app_identifier] = UI.input("App Identifier: ")
|
82
83
|
end
|
83
84
|
|
84
|
-
|
85
|
+
platform = fetch_app_platform(required: false)
|
86
|
+
builds = app.all_processing_builds(platform: platform) + app.builds(platform: platform)
|
85
87
|
# sort by upload_date
|
86
88
|
builds.sort! { |a, b| a.upload_date <=> b.upload_date }
|
87
89
|
rows = builds.collect { |build| describe_build(build) }
|
@@ -93,6 +95,17 @@ module Pilot
|
|
93
95
|
)
|
94
96
|
end
|
95
97
|
|
98
|
+
def self.truncate_changelog(changelog)
|
99
|
+
max_changelog_length = 4000
|
100
|
+
if changelog && changelog.length > max_changelog_length
|
101
|
+
original_length = changelog.length
|
102
|
+
bottom_message = "..."
|
103
|
+
changelog = "#{changelog[0...max_changelog_length - bottom_message.length]}#{bottom_message}"
|
104
|
+
UI.important "Changelog has been truncated since it exceeds Apple's #{max_changelog_length} character limit. It currently contains #{original_length} characters."
|
105
|
+
end
|
106
|
+
return changelog
|
107
|
+
end
|
108
|
+
|
96
109
|
private
|
97
110
|
|
98
111
|
def describe_build(build)
|
@@ -111,7 +124,7 @@ module Pilot
|
|
111
124
|
|
112
125
|
# This method will takes care of checking for the processing builds every few seconds
|
113
126
|
# @return [Build] The build that we just uploaded
|
114
|
-
def wait_for_processing_build(options)
|
127
|
+
def wait_for_processing_build(options, platform)
|
115
128
|
# the upload date of the new buid
|
116
129
|
# we use it to identify the build
|
117
130
|
start = Time.now
|
@@ -127,10 +140,10 @@ module Pilot
|
|
127
140
|
# build trains right away, and if we don't do this check, we will
|
128
141
|
# get break out of this loop and then generate an error later when we
|
129
142
|
# have a nil build
|
130
|
-
if app.build_trains.count == 0
|
143
|
+
if app.build_trains(platform: platform).count == 0
|
131
144
|
UI.message("New application; waiting for build train to appear on iTunes Connect")
|
132
145
|
else
|
133
|
-
builds = app.all_processing_builds
|
146
|
+
builds = app.all_processing_builds(platform: platform)
|
134
147
|
break if builds.count == 0
|
135
148
|
latest_build = builds.last
|
136
149
|
|
@@ -155,9 +168,7 @@ module Pilot
|
|
155
168
|
# true -> false, where the second true is transient. This causes a spurious failure. Find build by build_version
|
156
169
|
# and ensure it's not processing before proceeding - it had to have already been false before, to get out of the
|
157
170
|
# previous loop.
|
158
|
-
|
159
|
-
builds = build_train ? build_train.builds : []
|
160
|
-
full_build = builds.find do |b|
|
171
|
+
full_build = app.build_trains(platform: platform)[latest_build.train_version].builds.find do |b|
|
161
172
|
b.build_version == latest_build.build_version
|
162
173
|
end
|
163
174
|
|
data/lib/pilot/manager.rb
CHANGED
@@ -56,5 +56,16 @@ module Pilot
|
|
56
56
|
UI.verbose("App identifier (#{result})")
|
57
57
|
return result
|
58
58
|
end
|
59
|
+
|
60
|
+
def fetch_app_platform(required: true)
|
61
|
+
result = config[:app_platform]
|
62
|
+
result ||= FastlaneCore::IpaFileAnalyser.fetch_app_platform(config[:ipa]) if config[:ipa]
|
63
|
+
if required
|
64
|
+
result ||= ask("Please enter the app's platform (appletvos, ios, osx): ")
|
65
|
+
UI.user_error!("App Platform must be ios, appletvos, or osx") unless ['ios', 'appletvos', 'osx'].include? result
|
66
|
+
UI.verbose("App Platform (#{result})")
|
67
|
+
end
|
68
|
+
return result
|
69
|
+
end
|
59
70
|
end
|
60
71
|
end
|
data/lib/pilot/options.rb
CHANGED
@@ -19,6 +19,14 @@ module Pilot
|
|
19
19
|
description: "The bundle identifier of the app to upload or manage testers (optional)",
|
20
20
|
optional: true,
|
21
21
|
default_value: ENV["TESTFLIGHT_APP_IDENTITIFER"] || CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)),
|
22
|
+
FastlaneCore::ConfigItem.new(key: :app_platform,
|
23
|
+
short_option: "-m",
|
24
|
+
env_name: "PILOT_PLATFORM",
|
25
|
+
description: "The platform to use (optional)",
|
26
|
+
optional: true,
|
27
|
+
verify_block: proc do |value|
|
28
|
+
UI.user_error!("The platform can only be ios, appletvos, or osx") unless ['ios', 'appletvos', 'osx'].include? value
|
29
|
+
end),
|
22
30
|
FastlaneCore::ConfigItem.new(key: :ipa,
|
23
31
|
short_option: "-i",
|
24
32
|
optional: true,
|
data/lib/pilot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pilot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.13.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-
|
11
|
+
date: 2016-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane_core
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.60.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 1.0.0
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.60.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.0.0
|
@@ -36,7 +36,7 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: 0.
|
39
|
+
version: 0.39.0
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: 1.0.0
|
@@ -46,7 +46,7 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.
|
49
|
+
version: 0.39.0
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: 1.0.0
|
@@ -102,16 +102,16 @@ dependencies:
|
|
102
102
|
name: rake
|
103
103
|
requirement: !ruby/object:Gem::Requirement
|
104
104
|
requirements:
|
105
|
-
- - "
|
105
|
+
- - "<"
|
106
106
|
- !ruby/object:Gem::Version
|
107
|
-
version: '
|
107
|
+
version: '12'
|
108
108
|
type: :development
|
109
109
|
prerelease: false
|
110
110
|
version_requirements: !ruby/object:Gem::Requirement
|
111
111
|
requirements:
|
112
|
-
- - "
|
112
|
+
- - "<"
|
113
113
|
- !ruby/object:Gem::Version
|
114
|
-
version: '
|
114
|
+
version: '12'
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
116
|
name: rspec
|
117
117
|
requirement: !ruby/object:Gem::Requirement
|