fastlane 2.3.1 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/credentials_manager/lib/credentials_manager/account_manager.rb +15 -1
- data/deliver/lib/deliver/detect_values.rb +1 -1
- data/deliver/lib/deliver/runner.rb +5 -3
- data/fastlane/lib/fastlane/actions/add_git_tag.rb +7 -0
- data/fastlane/lib/fastlane/actions/deploygate.rb +36 -12
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/screengrab/lib/screengrab/options.rb +5 -1
- data/screengrab/lib/screengrab/runner.rb +5 -1
- data/sigh/lib/sigh/options.rb +12 -1
- data/sigh/lib/sigh/runner.rb +4 -2
- data/snapshot/lib/snapshot/collector.rb +3 -3
- data/snapshot/lib/snapshot/reset_simulators.rb +18 -10
- data/spaceship/lib/spaceship/portal/app.rb +7 -0
- data/spaceship/lib/spaceship/portal/portal_client.rb +11 -0
- metadata +2 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30bf18c8b5fd980a862648ec6cba94f11f0b1aed
|
4
|
+
data.tar.gz: 3558eaec5dcce06536ed04f2fa20a7315c2b3b4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 725d84319bf1219fef0658c4f29f5004baa1fb7eb8625642855f48a3b0d607c4839e2519575a31fcc4963cca43189379e5f4ff405287e250a1d27094639dd926
|
7
|
+
data.tar.gz: 1dcb5131e5708cd5c2c0841192e66b65f97768bee7e371b45aa09468d2fd38042a9d498bb8d760e39d79b642394fd953de22888e09345686be074788b8fa2784
|
@@ -56,7 +56,11 @@ module CredentialsManager
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def add_to_keychain
|
59
|
-
|
59
|
+
if options
|
60
|
+
Security::InternetPassword.add(server_name, user, password, options)
|
61
|
+
else
|
62
|
+
Security::InternetPassword.add(server_name, user, password)
|
63
|
+
end
|
60
64
|
end
|
61
65
|
|
62
66
|
def remove_from_keychain
|
@@ -68,6 +72,16 @@ module CredentialsManager
|
|
68
72
|
"#{@prefix}.#{user}"
|
69
73
|
end
|
70
74
|
|
75
|
+
# Use env variables from this method to augment internet password item with additional data.
|
76
|
+
# These variables are used by Xamarin Studio to authenticate Apple developers.
|
77
|
+
def options
|
78
|
+
hash = {}
|
79
|
+
hash[:p] = ENV["FASTLANE_PATH"] if ENV["FASTLANE_PATH"]
|
80
|
+
hash[:P] = ENV["FASTLANE_PORT"] if ENV["FASTLANE_PORT"]
|
81
|
+
hash[:r] = ENV["FASTLANE_PROTOCOL"] if ENV["FASTLANE_PROTOCOL"]
|
82
|
+
hash.empty? ? nil : hash
|
83
|
+
end
|
84
|
+
|
71
85
|
private
|
72
86
|
|
73
87
|
def ask_for_login
|
@@ -1,12 +1,12 @@
|
|
1
1
|
module Deliver
|
2
2
|
class DetectValues
|
3
3
|
def run!(options, skip_params = {})
|
4
|
+
find_platform(options)
|
4
5
|
find_app_identifier(options)
|
5
6
|
find_app(options)
|
6
7
|
find_folders(options)
|
7
8
|
ensure_folders_created(options)
|
8
9
|
find_version(options) unless skip_params[:skip_version]
|
9
|
-
find_platform(options)
|
10
10
|
end
|
11
11
|
|
12
12
|
def find_app_identifier(options)
|
@@ -36,7 +36,7 @@ module Deliver
|
|
36
36
|
app_version = options[:app_version]
|
37
37
|
UI.message("Making sure the latest version on iTunes Connect matches '#{app_version}' from the ipa file...")
|
38
38
|
|
39
|
-
changed = options[:app].ensure_version!(app_version, platform: options[:
|
39
|
+
changed = options[:app].ensure_version!(app_version, platform: options[:platform])
|
40
40
|
|
41
41
|
if changed
|
42
42
|
UI.success("Successfully set the version to '#{app_version}'")
|
@@ -86,13 +86,15 @@ module Deliver
|
|
86
86
|
package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate(
|
87
87
|
app_id: options[:app].apple_id,
|
88
88
|
ipa_path: options[:ipa],
|
89
|
-
package_path: "/tmp"
|
89
|
+
package_path: "/tmp",
|
90
|
+
platform: options[:platform]
|
90
91
|
)
|
91
92
|
elsif options[:pkg]
|
92
93
|
package_path = FastlaneCore::PkgUploadPackageBuilder.new.generate(
|
93
94
|
app_id: options[:app].apple_id,
|
94
95
|
pkg_path: options[:pkg],
|
95
|
-
package_path: "/tmp"
|
96
|
+
package_path: "/tmp",
|
97
|
+
platform: options[:platform]
|
96
98
|
)
|
97
99
|
end
|
98
100
|
|
@@ -12,6 +12,7 @@ module Fastlane
|
|
12
12
|
|
13
13
|
cmd << ["-am #{message.shellescape}"]
|
14
14
|
cmd << '--force' if options[:force]
|
15
|
+
cmd << '-s' if options[:sign]
|
15
16
|
cmd << "'#{tag}'"
|
16
17
|
cmd << options[:commit].to_s if options[:commit]
|
17
18
|
|
@@ -67,6 +68,12 @@ module Fastlane
|
|
67
68
|
description: "Force adding the tag",
|
68
69
|
optional: true,
|
69
70
|
is_string: false,
|
71
|
+
default_value: false),
|
72
|
+
FastlaneCore::ConfigItem.new(key: :sign,
|
73
|
+
env_name: "FL_GIT_TAG_SIGN",
|
74
|
+
description: "Make a GPG-signed tag, using the default e-mail address's key",
|
75
|
+
optional: true,
|
76
|
+
is_string: false,
|
70
77
|
default_value: false)
|
71
78
|
]
|
72
79
|
end
|
@@ -10,10 +10,10 @@ module Fastlane
|
|
10
10
|
DEPLOYGATE_URL_BASE = 'https://deploygate.com'
|
11
11
|
|
12
12
|
def self.is_supported?(platform)
|
13
|
-
|
13
|
+
[:ios, :android].include?(platform)
|
14
14
|
end
|
15
15
|
|
16
|
-
def self.upload_build(api_token, user_name,
|
16
|
+
def self.upload_build(api_token, user_name, binary, options)
|
17
17
|
require 'faraday'
|
18
18
|
require 'faraday_middleware'
|
19
19
|
|
@@ -27,7 +27,7 @@ module Fastlane
|
|
27
27
|
|
28
28
|
options.update({
|
29
29
|
token: api_token,
|
30
|
-
file: Faraday::UploadIO.new(
|
30
|
+
file: Faraday::UploadIO.new(binary, 'application/octet-stream'),
|
31
31
|
message: options[:message] || ''
|
32
32
|
})
|
33
33
|
|
@@ -39,23 +39,25 @@ module Fastlane
|
|
39
39
|
|
40
40
|
def self.run(options)
|
41
41
|
# Available options: https://deploygate.com/docs/api
|
42
|
-
UI.success('Starting with
|
42
|
+
UI.success('Starting with app upload to DeployGate... this could take some time ⏳')
|
43
43
|
|
44
44
|
api_token = options[:api_token]
|
45
45
|
user_name = options[:user]
|
46
|
-
|
46
|
+
binary = options[:ipa] || options[:apk]
|
47
47
|
upload_options = options.values.select do |key, _|
|
48
|
-
[:message, :distribution_key, :release_note].include? key
|
48
|
+
[:message, :distribution_key, :release_note, :disable_notify].include? key
|
49
49
|
end
|
50
50
|
|
51
|
-
|
51
|
+
raise 'missing `ipa` and `apk`. deploygate action needs least one.' unless binary
|
52
52
|
|
53
|
-
|
53
|
+
return binary if Helper.test?
|
54
|
+
|
55
|
+
response = self.upload_build(api_token, user_name, binary, upload_options)
|
54
56
|
if parse_response(response)
|
55
57
|
UI.message("DeployGate URL: #{Actions.lane_context[SharedValues::DEPLOYGATE_URL]}")
|
56
58
|
UI.success("Build successfully uploaded to DeployGate as revision \##{Actions.lane_context[SharedValues::DEPLOYGATE_REVISION]}!")
|
57
59
|
else
|
58
|
-
UI.user_error!("Error when trying to upload
|
60
|
+
UI.user_error!("Error when trying to upload app to DeployGate")
|
59
61
|
end
|
60
62
|
end
|
61
63
|
|
@@ -126,9 +128,18 @@ module Fastlane
|
|
126
128
|
env_name: "DEPLOYGATE_IPA_PATH",
|
127
129
|
description: "Path to your IPA file. Optional if you use the _gym_ or _xcodebuild_ action",
|
128
130
|
default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH],
|
131
|
+
optional: true,
|
129
132
|
verify_block: proc do |value|
|
130
133
|
UI.user_error!("Couldn't find ipa file at path '#{value}'") unless File.exist?(value)
|
131
134
|
end),
|
135
|
+
FastlaneCore::ConfigItem.new(key: :apk,
|
136
|
+
env_name: "DEPLOYGATE_APK_PATH",
|
137
|
+
description: "Path to your APK file",
|
138
|
+
default_value: Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH],
|
139
|
+
optional: true,
|
140
|
+
verify_block: proc do |value|
|
141
|
+
UI.user_error!("Couldn't find apk file at path '#{value}'") unless File.exist?(value)
|
142
|
+
end),
|
132
143
|
FastlaneCore::ConfigItem.new(key: :message,
|
133
144
|
env_name: "DEPLOYGATE_MESSAGE",
|
134
145
|
description: "Release Notes",
|
@@ -141,7 +152,13 @@ module Fastlane
|
|
141
152
|
FastlaneCore::ConfigItem.new(key: :release_note,
|
142
153
|
optional: true,
|
143
154
|
env_name: "DEPLOYGATE_RELEASE_NOTE",
|
144
|
-
description: "Release note for distribution page")
|
155
|
+
description: "Release note for distribution page"),
|
156
|
+
FastlaneCore::ConfigItem.new(key: :disable_notify,
|
157
|
+
optional: true,
|
158
|
+
is_string: false,
|
159
|
+
default_value: false,
|
160
|
+
env_name: "DEPLOYGATE_DISABLE_NOTIFY",
|
161
|
+
description: "Disables Push notification emails")
|
145
162
|
]
|
146
163
|
end
|
147
164
|
|
@@ -161,6 +178,13 @@ module Fastlane
|
|
161
178
|
ipa: "./ipa_file.ipa",
|
162
179
|
message: "Build #{lane_context[SharedValues::BUILD_NUMBER]}",
|
163
180
|
distribution_key: "(Optional) Target Distribution Key"
|
181
|
+
)',
|
182
|
+
'deploygate(
|
183
|
+
api_token: "...",
|
184
|
+
user: "target username or organization name",
|
185
|
+
apk: "./apk_file.apk",
|
186
|
+
message: "Build #{lane_context[SharedValues::BUILD_NUMBER]}",
|
187
|
+
distribution_key: "(Optional) Target Distribution Key"
|
164
188
|
)'
|
165
189
|
]
|
166
190
|
end
|
@@ -169,8 +193,8 @@ module Fastlane
|
|
169
193
|
:beta
|
170
194
|
end
|
171
195
|
|
172
|
-
def self.
|
173
|
-
"tnj"
|
196
|
+
def self.authors
|
197
|
+
["tnj", "tomorrowkey"]
|
174
198
|
end
|
175
199
|
end
|
176
200
|
end
|
@@ -102,7 +102,11 @@ module Screengrab
|
|
102
102
|
default_value: "phone",
|
103
103
|
verify_block: proc do |value|
|
104
104
|
UI.user_error! "device_type must be one of: #{DEVICE_TYPES}" unless DEVICE_TYPES.include?(value)
|
105
|
-
end)
|
105
|
+
end),
|
106
|
+
FastlaneCore::ConfigItem.new(key: :exit_on_test_failure,
|
107
|
+
env_name: 'EXIT_ON_TEST_FAILURE',
|
108
|
+
description: "Whether or not to exit Screengrab on test failure. Exiting on failure will not copy sceenshots to local machine nor open sceenshots summary",
|
109
|
+
default_value: true)
|
106
110
|
]
|
107
111
|
end
|
108
112
|
end
|
@@ -225,7 +225,11 @@ module Screengrab
|
|
225
225
|
print_all: true,
|
226
226
|
print_command: true)
|
227
227
|
|
228
|
-
|
228
|
+
if @config[:exit_on_test_failure]
|
229
|
+
UI.user_error!("Tests failed", show_github_issues: false) if test_output.include?("FAILURES!!!")
|
230
|
+
else
|
231
|
+
UI.error("Tests failed") if test_output.include?("FAILURES!!!")
|
232
|
+
end
|
229
233
|
end
|
230
234
|
end
|
231
235
|
|
data/sigh/lib/sigh/options.rb
CHANGED
@@ -110,7 +110,18 @@ module Sigh
|
|
110
110
|
env_name: "SIGH_SKIP_CERTIFICATE_VERIFICATION",
|
111
111
|
description: "Skips the verification of the certificates for every existing profiles. This will make sure the provisioning profile can be used on the local machine",
|
112
112
|
is_string: false,
|
113
|
-
default_value: false)
|
113
|
+
default_value: false),
|
114
|
+
FastlaneCore::ConfigItem.new(key: :platform,
|
115
|
+
short_option: '-p',
|
116
|
+
env_name: "SIGH_PLATFORM",
|
117
|
+
description: "Set the provisioning profile's platform (i.e. ios, tvos)",
|
118
|
+
is_string: false,
|
119
|
+
default_value: "ios",
|
120
|
+
verify_block: proc do |value|
|
121
|
+
value = value.to_s
|
122
|
+
pt = %w(macos tvos ios)
|
123
|
+
UI.user_error!("Unsupported platform, must be: #{pt}") unless pt.include?(value)
|
124
|
+
end)
|
114
125
|
]
|
115
126
|
end
|
116
127
|
end
|
data/sigh/lib/sigh/runner.rb
CHANGED
@@ -131,10 +131,12 @@ module Sigh
|
|
131
131
|
end
|
132
132
|
end
|
133
133
|
|
134
|
-
UI.important "Creating new provisioning profile for '#{Sigh.config[:app_identifier]}' with name '#{name}'"
|
134
|
+
UI.important "Creating new provisioning profile for '#{Sigh.config[:app_identifier]}' with name '#{name} for #{Sigh.config[:platform]} platform'"
|
135
135
|
profile = profile_type.create!(name: name,
|
136
136
|
bundle_id: bundle_id,
|
137
|
-
certificate: cert
|
137
|
+
certificate: cert,
|
138
|
+
mac: Sigh.config[:platform].to_s == 'macos',
|
139
|
+
sub_platform: Sigh.config[:platform].to_s == 'tvos' ? 'tvos' : nil)
|
138
140
|
profile
|
139
141
|
end
|
140
142
|
|
@@ -26,9 +26,9 @@ module Snapshot
|
|
26
26
|
FileUtils.mkdir_p(language_folder)
|
27
27
|
|
28
28
|
device_name = device_type.delete(" ")
|
29
|
-
components = [
|
30
|
-
|
31
|
-
output_path = File.join(language_folder,
|
29
|
+
components = [launch_arguments_index].delete_if { |a| a.to_s.length == 0 }
|
30
|
+
screenshot_name = device_name + "-" + name + "-" + Digest::MD5.hexdigest(components.join("-")) + ".png"
|
31
|
+
output_path = File.join(language_folder, screenshot_name)
|
32
32
|
from_path = File.join(attachments_path, filename)
|
33
33
|
if $verbose
|
34
34
|
UI.success "Copying file '#{from_path}' to '#{output_path}'..."
|
@@ -15,9 +15,17 @@ module Snapshot
|
|
15
15
|
`xcrun simctl delete #{id}`
|
16
16
|
end
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
all_runtime_type = `xcrun simctl list runtimes`.scan(/(.*)\s\(.*\((.*)\)/)
|
19
|
+
# == Runtimes ==
|
20
|
+
# iOS 9.3 (9.3 - 13E233) (com.apple.CoreSimulator.SimRuntime.iOS-9-3)
|
21
|
+
# iOS 10.0 (10.0 - 14A345) (com.apple.CoreSimulator.SimRuntime.iOS-10-0)
|
22
|
+
# iOS 10.1 (10.1 - 14B72) (com.apple.CoreSimulator.SimRuntime.iOS-10-1)
|
23
|
+
# iOS 10.2 (10.2 - 14C89) (com.apple.CoreSimulator.SimRuntime.iOS-10-2)
|
24
|
+
# tvOS 10.1 (10.1 - 14U591) (com.apple.CoreSimulator.SimRuntime.tvOS-10-1)
|
25
|
+
# watchOS 3.1 (3.1 - 14S471a) (com.apple.CoreSimulator.SimRuntime.watchOS-3-1)
|
26
|
+
ios_versions_ids = filter_runtimes(all_runtime_type, 'iOS', ios_versions)
|
27
|
+
tv_version_ids = filter_runtimes(all_runtime_type, 'tvOS')
|
28
|
+
watch_versions_ids = filter_runtimes(all_runtime_type, 'watchOS')
|
21
29
|
|
22
30
|
all_device_types = `xcrun simctl list devicetypes`.scan(/(.*)\s\((.*)\)/)
|
23
31
|
# == Device Types ==
|
@@ -27,11 +35,11 @@ module Snapshot
|
|
27
35
|
# iPhone 6 (com.apple.CoreSimulator.SimDeviceType.iPhone-6)
|
28
36
|
all_device_types.each do |device_type|
|
29
37
|
if device_type.join(' ').include?("Watch")
|
30
|
-
create(device_type,
|
38
|
+
create(device_type, watch_versions_ids, 'watchOS')
|
31
39
|
elsif device_type.join(' ').include?("TV")
|
32
|
-
create(device_type,
|
40
|
+
create(device_type, tv_version_ids, 'tvOS')
|
33
41
|
else
|
34
|
-
create(device_type,
|
42
|
+
create(device_type, ios_versions_ids)
|
35
43
|
end
|
36
44
|
end
|
37
45
|
|
@@ -40,13 +48,13 @@ module Snapshot
|
|
40
48
|
|
41
49
|
def self.create(device_type, os_versions, os_name = 'iOS')
|
42
50
|
os_versions.each do |os_version|
|
43
|
-
puts "Creating #{device_type} for #{os_name} version #{os_version}"
|
44
|
-
`xcrun simctl create '#{device_type[0]}' #{device_type[1]} #{os_version}`
|
51
|
+
puts "Creating #{device_type[0]} for #{os_name} version #{os_version[0]}"
|
52
|
+
`xcrun simctl create '#{device_type[0]}' #{device_type[1]} #{os_version[1]}`
|
45
53
|
end
|
46
54
|
end
|
47
55
|
|
48
|
-
def self.filter_runtimes(all_runtimes, os = 'iOS')
|
49
|
-
all_runtimes.select { |
|
56
|
+
def self.filter_runtimes(all_runtimes, os = 'iOS', versions = [])
|
57
|
+
all_runtimes.select { |v, id| v[/^#{os}/] }.select { |v, id| v[/#{versions.join("|")}$/] }
|
50
58
|
end
|
51
59
|
|
52
60
|
def self.devices
|
@@ -116,6 +116,13 @@ module Spaceship
|
|
116
116
|
self
|
117
117
|
end
|
118
118
|
|
119
|
+
# Update name of this App ID.
|
120
|
+
# @return (App) The app you updated. This is nil if the app can't be found
|
121
|
+
def update_name!(name, mac: false)
|
122
|
+
app = client.update_app_name!(app_id, name, mac: mac)
|
123
|
+
self.class.factory(app)
|
124
|
+
end
|
125
|
+
|
119
126
|
# Fetch a specific App ID details based on the bundle_id
|
120
127
|
# @return (App) The app you're looking for. This is nil if the app can't be found.
|
121
128
|
def details
|
@@ -187,6 +187,17 @@ module Spaceship
|
|
187
187
|
parse_response(r)
|
188
188
|
end
|
189
189
|
|
190
|
+
def update_app_name!(app_id, name, mac: false)
|
191
|
+
ensure_csrf(Spaceship::App)
|
192
|
+
|
193
|
+
r = request(:post, "account/#{platform_slug(mac)}/identifiers/updateAppIdName.action", {
|
194
|
+
teamId: team_id,
|
195
|
+
appIdId: app_id,
|
196
|
+
name: valid_name_for(name)
|
197
|
+
})
|
198
|
+
parse_response(r, 'appId')
|
199
|
+
end
|
200
|
+
|
190
201
|
#####################################################
|
191
202
|
# @!group App Groups
|
192
203
|
#####################################################
|
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.
|
4
|
+
version: 2.4.0
|
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:
|
17
|
+
date: 2017-01-03 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: slack-notifier
|
@@ -344,9 +344,6 @@ dependencies:
|
|
344
344
|
name: json
|
345
345
|
requirement: !ruby/object:Gem::Requirement
|
346
346
|
requirements:
|
347
|
-
- - ">="
|
348
|
-
- !ruby/object:Gem::Version
|
349
|
-
version: 2.0.1
|
350
347
|
- - "<"
|
351
348
|
- !ruby/object:Gem::Version
|
352
349
|
version: 3.0.0
|
@@ -354,9 +351,6 @@ dependencies:
|
|
354
351
|
prerelease: false
|
355
352
|
version_requirements: !ruby/object:Gem::Requirement
|
356
353
|
requirements:
|
357
|
-
- - ">="
|
358
|
-
- !ruby/object:Gem::Version
|
359
|
-
version: 2.0.1
|
360
354
|
- - "<"
|
361
355
|
- !ruby/object:Gem::Version
|
362
356
|
version: 3.0.0
|