fastlane 2.192.0 → 2.195.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +86 -86
- data/cert/lib/cert/options.rb +1 -1
- data/deliver/lib/deliver/options.rb +1 -1
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +1 -1
- data/fastlane/lib/fastlane/actions/get_provisioning_profile.rb +1 -1
- data/fastlane/lib/fastlane/actions/gradle.rb +16 -3
- data/fastlane/lib/fastlane/actions/last_git_commit.rb +1 -1
- data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +1 -1
- data/fastlane/lib/fastlane/actions/notarize.rb +27 -18
- data/fastlane/lib/fastlane/actions/prompt.rb +1 -1
- data/fastlane/lib/fastlane/actions/register_device.rb +1 -1
- data/fastlane/lib/fastlane/actions/register_devices.rb +1 -1
- data/fastlane/lib/fastlane/actions/set_changelog.rb +1 -1
- data/fastlane/lib/fastlane/actions/slather.rb +6 -0
- data/fastlane/lib/fastlane/actions/sync_code_signing.rb +1 -1
- data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +3 -1
- data/fastlane/lib/fastlane/actions/zip.rb +2 -2
- data/fastlane/lib/fastlane/documentation/markdown_docs_generator.rb +11 -5
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +2 -2
- data/fastlane/swift/Fastlane.swift +89 -98
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +1 -1
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +11 -3
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/PrecheckfileProtocol.swift +2 -2
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +1 -1
- data/fastlane/swift/Screengrabfile.swift +1 -1
- data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
- data/fastlane/swift/Snapshotfile.swift +1 -1
- data/fastlane/swift/SnapshotfileProtocol.swift +2 -2
- data/fastlane/swift/formatting/Brewfile.lock.json +5 -5
- data/fastlane_core/lib/fastlane_core/build_watcher.rb +25 -6
- data/fastlane_core/lib/fastlane_core/pkg_file_analyser.rb +5 -0
- data/match/lib/match/generator.rb +2 -1
- data/match/lib/match/options.rb +12 -2
- data/match/lib/match/runner.rb +100 -15
- data/pilot/lib/pilot/build_manager.rb +14 -3
- data/pilot/lib/pilot/manager.rb +3 -1
- data/pilot/lib/pilot/options.rb +21 -2
- data/precheck/lib/precheck/options.rb +1 -1
- data/sigh/lib/assets/resign.sh +1 -1
- data/sigh/lib/sigh/options.rb +6 -1
- data/sigh/lib/sigh/runner.rb +2 -2
- data/snapshot/lib/snapshot/options.rb +1 -1
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +9 -1
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/models/build.rb +4 -0
- data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +4 -0
- data/supply/lib/supply/uploader.rb +9 -6
- metadata +22 -25
- data/fastlane/lib/fastlane/actions/crashlytics.rb +0 -207
- data/fastlane/lib/fastlane/helper/crashlytics_helper.rb +0 -157
- data/spaceship/lib/spaceship/connect_api/testflight/.testflight.rb.swp +0 -0
@@ -112,7 +112,7 @@ module Spaceship
|
|
112
112
|
|
113
113
|
# @deprecated
|
114
114
|
def fetch_age_rating_declaration(client: nil)
|
115
|
-
raise 'AppStoreVersion no longer as
|
115
|
+
raise 'AppStoreVersion no longer as AgeRatingDeclaration as of App Store Connect API 1.3 - Use AppInfo instead'
|
116
116
|
end
|
117
117
|
|
118
118
|
#
|
@@ -86,6 +86,10 @@ module Spaceship
|
|
86
86
|
return build_beta_detail.nil? == false && build_beta_detail.ready_for_internal_testing?
|
87
87
|
end
|
88
88
|
|
89
|
+
def ready_for_external_testing?
|
90
|
+
return build_beta_detail.nil? == false && build_beta_detail.ready_for_external_testing?
|
91
|
+
end
|
92
|
+
|
89
93
|
def ready_for_beta_submission?
|
90
94
|
raise "No build_beta_detail included" unless build_beta_detail
|
91
95
|
return build_beta_detail.ready_for_beta_submission?
|
@@ -53,6 +53,10 @@ module Spaceship
|
|
53
53
|
return internal_build_state == InternalState::READY_FOR_BETA_TESTING
|
54
54
|
end
|
55
55
|
|
56
|
+
def processed?
|
57
|
+
return internal_build_state != InternalState::PROCESSING && external_build_state != ExternalState::PROCESSING
|
58
|
+
end
|
59
|
+
|
56
60
|
def ready_for_beta_submission?
|
57
61
|
return external_build_state == ExternalState::READY_FOR_BETA_SUBMISSION
|
58
62
|
end
|
@@ -13,6 +13,8 @@ module Supply
|
|
13
13
|
apk_version_codes.concat(upload_bundles) unless Supply.config[:skip_upload_aab]
|
14
14
|
upload_mapping(apk_version_codes)
|
15
15
|
|
16
|
+
track_to_update = Supply.config[:track]
|
17
|
+
|
16
18
|
apk_version_codes.concat(Supply.config[:version_codes_to_retain]) if Supply.config[:version_codes_to_retain]
|
17
19
|
|
18
20
|
if !apk_version_codes.empty?
|
@@ -23,13 +25,14 @@ module Supply
|
|
23
25
|
else
|
24
26
|
# Only promote or rollout if we don't have version codes
|
25
27
|
if Supply.config[:track_promote_to]
|
28
|
+
track_to_update = Supply.config[:track_promote_to]
|
26
29
|
promote_track
|
27
30
|
elsif !Supply.config[:rollout].nil? && Supply.config[:track].to_s != ""
|
28
31
|
update_rollout
|
29
32
|
end
|
30
33
|
end
|
31
34
|
|
32
|
-
perform_upload_meta(apk_version_codes)
|
35
|
+
perform_upload_meta(apk_version_codes, track_to_update)
|
33
36
|
|
34
37
|
if Supply.config[:validate_only]
|
35
38
|
UI.message("Validating all changes with Google Play...")
|
@@ -70,7 +73,7 @@ module Supply
|
|
70
73
|
end
|
71
74
|
end
|
72
75
|
|
73
|
-
def perform_upload_meta(version_codes)
|
76
|
+
def perform_upload_meta(version_codes, track_name)
|
74
77
|
if (!Supply.config[:skip_upload_metadata] || !Supply.config[:skip_upload_images] || !Supply.config[:skip_upload_changelogs] || !Supply.config[:skip_upload_screenshots]) && metadata_path
|
75
78
|
# Use version code from config if version codes is empty and no nil or empty string
|
76
79
|
version_codes = [Supply.config[:version_code]] if version_codes.empty?
|
@@ -81,7 +84,7 @@ module Supply
|
|
81
84
|
version_codes.each do |version_code|
|
82
85
|
UI.user_error!("Could not find folder #{metadata_path}") unless File.directory?(metadata_path)
|
83
86
|
|
84
|
-
track, release = fetch_track_and_release!(
|
87
|
+
track, release = fetch_track_and_release!(track_name, version_code)
|
85
88
|
UI.user_error!("Unable to find the requested track - '#{Supply.config[:track]}'") unless track
|
86
89
|
UI.user_error!("Could not find release for version code '#{version_code}' to update changelog") unless release
|
87
90
|
|
@@ -98,7 +101,7 @@ module Supply
|
|
98
101
|
release_notes << upload_changelog(language, version_code) unless Supply.config[:skip_upload_changelogs]
|
99
102
|
end
|
100
103
|
|
101
|
-
upload_changelogs(release_notes, release, track) unless release_notes.empty?
|
104
|
+
upload_changelogs(release_notes, release, track, track_name) unless release_notes.empty?
|
102
105
|
end
|
103
106
|
end
|
104
107
|
end
|
@@ -239,9 +242,9 @@ module Supply
|
|
239
242
|
)
|
240
243
|
end
|
241
244
|
|
242
|
-
def upload_changelogs(release_notes, release, track)
|
245
|
+
def upload_changelogs(release_notes, release, track, track_name)
|
243
246
|
release.release_notes = release_notes
|
244
|
-
client.upload_changelogs(track,
|
247
|
+
client.upload_changelogs(track, track_name)
|
245
248
|
end
|
246
249
|
|
247
250
|
def upload_metadata(language, listing)
|
metadata
CHANGED
@@ -1,38 +1,38 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.195.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Jan Piotrowski
|
8
|
-
- Manu Wallner
|
9
|
-
- Jérôme Lacoste
|
10
|
-
- Helmut Januschka
|
11
|
-
- Daniel Jankowski
|
12
|
-
- Satoshi Namai
|
13
|
-
- Joshua Liebowitz
|
14
|
-
- Roger Oba
|
15
|
-
- Josh Holtz
|
16
|
-
- Matthew Ellis
|
17
|
-
- Andrew McBurney
|
18
|
-
- Aaron Brager
|
19
7
|
- Stefan Natchev
|
20
|
-
-
|
21
|
-
-
|
8
|
+
- Roger Oba
|
9
|
+
- Fumiya Nakamura
|
10
|
+
- Jérôme Lacoste
|
11
|
+
- Iulian Onofrei
|
22
12
|
- Jorge Revuelta H
|
23
13
|
- Max Ott
|
24
|
-
-
|
25
|
-
- Iulian Onofrei
|
14
|
+
- Daniel Jankowski
|
26
15
|
- Olivier Halligon
|
27
|
-
-
|
16
|
+
- Helmut Januschka
|
17
|
+
- Manish Rathi
|
18
|
+
- Jan Piotrowski
|
28
19
|
- Danielle Tomlinson
|
29
|
-
- Kohki Miki
|
30
|
-
- Fumiya Nakamura
|
31
20
|
- Luka Mirosevic
|
21
|
+
- Jimmy Dee
|
22
|
+
- Andrew McBurney
|
23
|
+
- Joshua Liebowitz
|
24
|
+
- Satoshi Namai
|
25
|
+
- Felix Krause
|
26
|
+
- Kohki Miki
|
27
|
+
- Aaron Brager
|
28
|
+
- Matthew Ellis
|
29
|
+
- Josh Holtz
|
30
|
+
- Maksym Grebenets
|
31
|
+
- Manu Wallner
|
32
32
|
autorequire:
|
33
33
|
bindir: bin
|
34
34
|
cert_chain: []
|
35
|
-
date: 2021-
|
35
|
+
date: 2021-09-25 00:00:00.000000000 Z
|
36
36
|
dependencies:
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: xcodeproj
|
@@ -1056,7 +1056,6 @@ files:
|
|
1056
1056
|
- fastlane/lib/fastlane/actions/commit_github_file.rb
|
1057
1057
|
- fastlane/lib/fastlane/actions/commit_version_bump.rb
|
1058
1058
|
- fastlane/lib/fastlane/actions/copy_artifacts.rb
|
1059
|
-
- fastlane/lib/fastlane/actions/crashlytics.rb
|
1060
1059
|
- fastlane/lib/fastlane/actions/create_app_on_managed_play_store.rb
|
1061
1060
|
- fastlane/lib/fastlane/actions/create_app_online.rb
|
1062
1061
|
- fastlane/lib/fastlane/actions/create_keychain.rb
|
@@ -1278,7 +1277,6 @@ files:
|
|
1278
1277
|
- fastlane/lib/fastlane/features.rb
|
1279
1278
|
- fastlane/lib/fastlane/helper/README.md
|
1280
1279
|
- fastlane/lib/fastlane/helper/adb_helper.rb
|
1281
|
-
- fastlane/lib/fastlane/helper/crashlytics_helper.rb
|
1282
1280
|
- fastlane/lib/fastlane/helper/dotenv_helper.rb
|
1283
1281
|
- fastlane/lib/fastlane/helper/gem_helper.rb
|
1284
1282
|
- fastlane/lib/fastlane/helper/git_helper.rb
|
@@ -1713,7 +1711,6 @@ files:
|
|
1713
1711
|
- spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb
|
1714
1712
|
- spaceship/lib/spaceship/connect_api/response.rb
|
1715
1713
|
- spaceship/lib/spaceship/connect_api/spaceship.rb
|
1716
|
-
- spaceship/lib/spaceship/connect_api/testflight/.testflight.rb.swp
|
1717
1714
|
- spaceship/lib/spaceship/connect_api/testflight/client.rb
|
1718
1715
|
- spaceship/lib/spaceship/connect_api/testflight/testflight.rb
|
1719
1716
|
- spaceship/lib/spaceship/connect_api/token.rb
|
@@ -1874,7 +1871,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1874
1871
|
- !ruby/object:Gem::Version
|
1875
1872
|
version: '0'
|
1876
1873
|
requirements: []
|
1877
|
-
rubygems_version: 3.1.
|
1874
|
+
rubygems_version: 3.1.6
|
1878
1875
|
signing_key:
|
1879
1876
|
specification_version: 4
|
1880
1877
|
summary: The easiest way to automate beta deployments and releases for your iOS and
|
@@ -1,207 +0,0 @@
|
|
1
|
-
module Fastlane
|
2
|
-
module Actions
|
3
|
-
class CrashlyticsAction < Action
|
4
|
-
def self.run(params)
|
5
|
-
params.values # to validate all inputs before looking for the ipa/apk
|
6
|
-
tempfiles = []
|
7
|
-
|
8
|
-
# We need to store notes in a file, because the crashlytics CLI (iOS) says so
|
9
|
-
if params[:notes]
|
10
|
-
UI.error("Overwriting :notes_path, because you specified :notes") if params[:notes_path]
|
11
|
-
|
12
|
-
changelog = Helper::CrashlyticsHelper.write_to_tempfile(params[:notes], 'changelog')
|
13
|
-
tempfiles << changelog
|
14
|
-
params[:notes_path] = changelog.path
|
15
|
-
elsif Actions.lane_context[SharedValues::FL_CHANGELOG] && !params[:notes_path]
|
16
|
-
UI.message("Sending FL_CHANGELOG as release notes to Beta by Crashlytics")
|
17
|
-
|
18
|
-
changelog = Helper::CrashlyticsHelper.write_to_tempfile(
|
19
|
-
Actions.lane_context[SharedValues::FL_CHANGELOG], 'changelog'
|
20
|
-
)
|
21
|
-
tempfiles << changelog
|
22
|
-
params[:notes_path] = changelog.path
|
23
|
-
end
|
24
|
-
|
25
|
-
if params[:ipa_path]
|
26
|
-
command = Helper::CrashlyticsHelper.generate_ios_command(params)
|
27
|
-
elsif params[:apk_path]
|
28
|
-
android_manifest = Helper::CrashlyticsHelper.generate_android_manifest_tempfile
|
29
|
-
tempfiles << android_manifest
|
30
|
-
command = Helper::CrashlyticsHelper.generate_android_command(params, android_manifest.path)
|
31
|
-
else
|
32
|
-
UI.user_error!("You have to either pass an ipa or an apk file to the Crashlytics action")
|
33
|
-
end
|
34
|
-
|
35
|
-
UI.success('Uploading the build to Crashlytics Beta. Time for some ☕️.')
|
36
|
-
|
37
|
-
sanitizer = proc do |message|
|
38
|
-
message.gsub(params[:api_token], '[[API_TOKEN]]')
|
39
|
-
.gsub(params[:build_secret], '[[BUILD_SECRET]]')
|
40
|
-
end
|
41
|
-
|
42
|
-
UI.verbose(sanitizer.call(command.join(' '))) if FastlaneCore::Globals.verbose?
|
43
|
-
|
44
|
-
error_callback = proc do |error|
|
45
|
-
clean_error = sanitizer.call(error)
|
46
|
-
UI.user_error!(clean_error)
|
47
|
-
end
|
48
|
-
|
49
|
-
result = Actions.sh_control_output(
|
50
|
-
command.join(" "),
|
51
|
-
print_command: false,
|
52
|
-
print_command_output: false,
|
53
|
-
error_callback: error_callback
|
54
|
-
)
|
55
|
-
|
56
|
-
tempfiles.each(&:unlink)
|
57
|
-
return command if Helper.test?
|
58
|
-
|
59
|
-
UI.verbose(sanitizer.call(result)) if FastlaneCore::Globals.verbose?
|
60
|
-
|
61
|
-
UI.success('Build successfully uploaded to Crashlytics Beta 🌷')
|
62
|
-
UI.success('Visit https://fabric.io/_/beta to add release notes and notify testers.')
|
63
|
-
end
|
64
|
-
|
65
|
-
def self.description
|
66
|
-
"Refer to [Firebase App Distribution](https://appdistro.page.link/fastlane-repo)"
|
67
|
-
end
|
68
|
-
|
69
|
-
def self.available_options
|
70
|
-
platform = Actions.lane_context[Actions::SharedValues::PLATFORM_NAME]
|
71
|
-
|
72
|
-
if platform == :ios || platform.nil?
|
73
|
-
ipa_path_default = Dir["*.ipa"].sort_by { |x| File.mtime(x) }.last
|
74
|
-
end
|
75
|
-
|
76
|
-
if platform == :android
|
77
|
-
apk_path_default = Dir["*.apk"].last || Dir[File.join("app", "build", "outputs", "apk", "app-release.apk")].last
|
78
|
-
end
|
79
|
-
|
80
|
-
[
|
81
|
-
# iOS Specific
|
82
|
-
FastlaneCore::ConfigItem.new(key: :ipa_path,
|
83
|
-
env_name: "CRASHLYTICS_IPA_PATH",
|
84
|
-
description: "Path to your IPA file. Optional if you use the _gym_ or _xcodebuild_ action",
|
85
|
-
default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] || ipa_path_default,
|
86
|
-
default_value_dynamic: true,
|
87
|
-
optional: true,
|
88
|
-
verify_block: proc do |value|
|
89
|
-
UI.user_error!("Couldn't find ipa file at path '#{value}'") unless File.exist?(value)
|
90
|
-
end),
|
91
|
-
# Android Specific
|
92
|
-
FastlaneCore::ConfigItem.new(key: :apk_path,
|
93
|
-
env_name: "CRASHLYTICS_APK_PATH",
|
94
|
-
description: "Path to your APK file",
|
95
|
-
default_value: Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH] || apk_path_default,
|
96
|
-
default_value_dynamic: true,
|
97
|
-
optional: true,
|
98
|
-
verify_block: proc do |value|
|
99
|
-
UI.user_error!("Couldn't find apk file at path '#{value}'") unless File.exist?(value)
|
100
|
-
end),
|
101
|
-
# General
|
102
|
-
FastlaneCore::ConfigItem.new(key: :crashlytics_path,
|
103
|
-
env_name: "CRASHLYTICS_FRAMEWORK_PATH",
|
104
|
-
description: "Path to the submit binary in the Crashlytics bundle (iOS) or `crashlytics-devtools.jar` file (Android)",
|
105
|
-
optional: true,
|
106
|
-
verify_block: proc do |value|
|
107
|
-
UI.user_error!("Couldn't find crashlytics at path '#{File.expand_path(value)}'`") unless File.exist?(File.expand_path(value))
|
108
|
-
end),
|
109
|
-
FastlaneCore::ConfigItem.new(key: :api_token,
|
110
|
-
env_name: "CRASHLYTICS_API_TOKEN",
|
111
|
-
description: "Crashlytics API Key",
|
112
|
-
sensitive: true,
|
113
|
-
verify_block: proc do |value|
|
114
|
-
UI.user_error!("No API token for Crashlytics given, pass using `api_token: 'token'`") unless value && !value.empty?
|
115
|
-
end),
|
116
|
-
FastlaneCore::ConfigItem.new(key: :build_secret,
|
117
|
-
env_name: "CRASHLYTICS_BUILD_SECRET",
|
118
|
-
description: "Crashlytics Build Secret",
|
119
|
-
sensitive: true,
|
120
|
-
verify_block: proc do |value|
|
121
|
-
UI.user_error!("No build secret for Crashlytics given, pass using `build_secret: 'secret'`") unless value && !value.empty?
|
122
|
-
end),
|
123
|
-
FastlaneCore::ConfigItem.new(key: :notes_path,
|
124
|
-
env_name: "CRASHLYTICS_NOTES_PATH",
|
125
|
-
description: "Path to the release notes",
|
126
|
-
optional: true,
|
127
|
-
verify_block: proc do |value|
|
128
|
-
UI.user_error!("Path '#{value}' not found") unless File.exist?(value)
|
129
|
-
end),
|
130
|
-
FastlaneCore::ConfigItem.new(key: :notes,
|
131
|
-
env_name: "CRASHLYTICS_NOTES",
|
132
|
-
description: "The release notes as string - uses :notes_path under the hood",
|
133
|
-
optional: true),
|
134
|
-
FastlaneCore::ConfigItem.new(key: :groups,
|
135
|
-
env_name: "CRASHLYTICS_GROUPS",
|
136
|
-
description: "The groups used for distribution, separated by commas",
|
137
|
-
type: Array,
|
138
|
-
optional: true),
|
139
|
-
FastlaneCore::ConfigItem.new(key: :emails,
|
140
|
-
env_name: "CRASHLYTICS_EMAILS",
|
141
|
-
description: "Pass email addresses of testers, separated by commas",
|
142
|
-
type: Array,
|
143
|
-
optional: true),
|
144
|
-
FastlaneCore::ConfigItem.new(key: :notifications,
|
145
|
-
env_name: "CRASHLYTICS_NOTIFICATIONS",
|
146
|
-
description: "Crashlytics notification option (true/false)",
|
147
|
-
default_value: true,
|
148
|
-
type: Boolean),
|
149
|
-
FastlaneCore::ConfigItem.new(key: :debug,
|
150
|
-
env_name: "CRASHLYTICS_DEBUG",
|
151
|
-
description: "Crashlytics debug option (true/false)",
|
152
|
-
default_value: false,
|
153
|
-
type: Boolean)
|
154
|
-
|
155
|
-
]
|
156
|
-
end
|
157
|
-
|
158
|
-
def self.is_supported?(platform)
|
159
|
-
[:ios, :mac, :android].include?(platform)
|
160
|
-
end
|
161
|
-
|
162
|
-
def self.author
|
163
|
-
["KrauseFx", "pedrogimenez"]
|
164
|
-
end
|
165
|
-
|
166
|
-
def self.details
|
167
|
-
[
|
168
|
-
"Additionally, you can specify `notes`, `emails`, `groups` and `notifications`.",
|
169
|
-
"Distributing to Groups: When using the `groups` parameter, it's important to use the group **alias** names for each group you'd like to distribute to. A group's alias can be found in the web UI. If you're viewing the Beta page, you can open the groups dialog by clicking the 'Manage Groups' button.",
|
170
|
-
"This action uses the `submit` binary provided by the Crashlytics framework. If the binary is not found in its usual path, you'll need to specify the path manually by using the `crashlytics_path` option."
|
171
|
-
].join("\n")
|
172
|
-
end
|
173
|
-
|
174
|
-
def self.example_code
|
175
|
-
[
|
176
|
-
'crashlytics',
|
177
|
-
'# If you installed Crashlytics via CocoaPods
|
178
|
-
crashlytics(
|
179
|
-
crashlytics_path: "./Pods/Crashlytics/submit", # path to your Crashlytics submit binary.
|
180
|
-
api_token: "...",
|
181
|
-
build_secret: "...",
|
182
|
-
ipa_path: "./app.ipa"
|
183
|
-
)',
|
184
|
-
'# If you installed Crashlytics via Carthage for iOS platform
|
185
|
-
crashlytics(
|
186
|
-
crashlytics_path: "./Carthage/Build/iOS/Crashlytics.framework/submit", # path to your Crashlytics submit binary.
|
187
|
-
api_token: "...",
|
188
|
-
build_secret: "...",
|
189
|
-
ipa_path: "./app.ipa"
|
190
|
-
)'
|
191
|
-
]
|
192
|
-
end
|
193
|
-
|
194
|
-
def self.category
|
195
|
-
:deprecated
|
196
|
-
end
|
197
|
-
|
198
|
-
def self.deprecated_notes
|
199
|
-
[
|
200
|
-
"Crashlytics Beta has been deprecated and replaced with Firebase App Distribution.",
|
201
|
-
"Beta will continue working until May 4, 2020.",
|
202
|
-
"Check out the [Firebase App Distribution docs](https://github.com/fastlane/fastlane-plugin-firebase_app_distribution) to get started."
|
203
|
-
].join("\n")
|
204
|
-
end
|
205
|
-
end
|
206
|
-
end
|
207
|
-
end
|
@@ -1,157 +0,0 @@
|
|
1
|
-
require 'shellwords'
|
2
|
-
|
3
|
-
module Fastlane
|
4
|
-
module Helper
|
5
|
-
class CrashlyticsHelper
|
6
|
-
class << self
|
7
|
-
def discover_crashlytics_path(params)
|
8
|
-
path = params[:crashlytics_path]
|
9
|
-
|
10
|
-
# Finding submit binary inside of given Crashlytics path (for backwards compatibility)
|
11
|
-
if path
|
12
|
-
if File.basename(path) != "submit"
|
13
|
-
path = Dir[File.join(path, '**', 'submit')].last
|
14
|
-
UI.verbose(":crashlytics_path passed through parameters did not point to a submit binary. Using this submit binary on that path instead: '#{path}'")
|
15
|
-
else
|
16
|
-
UI.verbose("Using :crashlytics_path passed in through parameters: '#{path}'")
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
# Check for submit binary outside of Crashlytics.framework (for Crashlytics 3.4.1 and over)
|
21
|
-
path ||= Dir["./Pods/Crashlytics/submit"].first
|
22
|
-
|
23
|
-
# Check for submit binary in Crashlytics.framework (for Crashlytics 3.4.1 and under)
|
24
|
-
path ||= Dir["./Pods/iOS/Crashlytics/Crashlytics.framework/submit"].last
|
25
|
-
path ||= Dir["./**/Crashlytics.framework/submit"].last
|
26
|
-
|
27
|
-
downcase_path = path ? path.downcase : nil
|
28
|
-
if downcase_path && downcase_path.include?("pods") && downcase_path.include?("crashlytics.framework")
|
29
|
-
UI.deprecated("Crashlytics has moved the submit binary outside of Crashlytics.framework directory as of 3.4.1. Please change :crashlytics_path to `<PODS_ROOT>/Crashlytics/submit`")
|
30
|
-
end
|
31
|
-
|
32
|
-
return path
|
33
|
-
end
|
34
|
-
|
35
|
-
def generate_ios_command(params)
|
36
|
-
submit_binary = discover_crashlytics_path(params)
|
37
|
-
unless submit_binary
|
38
|
-
UI.user_error!("Couldn't find Crashlytics' submit binary in current directory. Make sure to add the 'Crashlytics' pod to your 'Podfile' and run `pod update`")
|
39
|
-
end
|
40
|
-
if File.basename(submit_binary) != "submit"
|
41
|
-
UI.user_error!("Invalid crashlytics path was detected with '#{submit_binary}'. Path must point to the `submit` binary (example: './Pods/Crashlytics/submit')")
|
42
|
-
end
|
43
|
-
submit_binary = "Crashlytics.framework/submit" if Helper.test?
|
44
|
-
|
45
|
-
command = []
|
46
|
-
command << submit_binary.shellescape
|
47
|
-
command << params[:api_token]
|
48
|
-
command << params[:build_secret]
|
49
|
-
command << "-ipaPath '#{params[:ipa_path]}'"
|
50
|
-
command << "-emails '#{params[:emails].join(',')}'" if params[:emails]
|
51
|
-
command << "-notesPath '#{params[:notes_path]}'" if params[:notes_path]
|
52
|
-
command << "-groupAliases '#{params[:groups].join(',')}'" if params[:groups]
|
53
|
-
command << "-notifications #{(params[:notifications] ? 'YES' : 'NO')}"
|
54
|
-
command << "-debug #{(params[:debug] ? 'YES' : 'NO')}"
|
55
|
-
|
56
|
-
return command
|
57
|
-
end
|
58
|
-
|
59
|
-
def generate_android_command(params, android_manifest_path)
|
60
|
-
params[:crashlytics_path] = download_android_tools unless params[:crashlytics_path]
|
61
|
-
|
62
|
-
UI.user_error!("The `crashlytics_path` must be a jar file for Android") unless params[:crashlytics_path].end_with?(".jar") || Helper.test?
|
63
|
-
|
64
|
-
if ENV['JAVA_HOME'].nil?
|
65
|
-
command = ["java"]
|
66
|
-
else
|
67
|
-
command = [File.join(ENV['JAVA_HOME'], "/bin/java").shellescape]
|
68
|
-
end
|
69
|
-
command << "-jar #{File.expand_path(params[:crashlytics_path])}"
|
70
|
-
command << "-androidRes ."
|
71
|
-
command << "-apiKey #{params[:api_token]}"
|
72
|
-
command << "-apiSecret #{params[:build_secret]}"
|
73
|
-
command << "-uploadDist #{File.expand_path(params[:apk_path]).shellescape}"
|
74
|
-
command << "-androidManifest #{File.expand_path(android_manifest_path).shellescape}"
|
75
|
-
|
76
|
-
# Optional
|
77
|
-
command << "-betaDistributionEmails #{params[:emails].join(',').shellescape}" if params[:emails]
|
78
|
-
command << "-betaDistributionReleaseNotesFilePath #{File.expand_path(params[:notes_path]).shellescape}" if params[:notes_path]
|
79
|
-
command << "-betaDistributionGroupAliases #{params[:groups].join(',').shellescape}" if params[:groups]
|
80
|
-
command << "-betaDistributionNotifications #{(params[:notifications] ? 'true' : 'false')}"
|
81
|
-
|
82
|
-
return command
|
83
|
-
end
|
84
|
-
|
85
|
-
def download_android_tools
|
86
|
-
containing = File.join(File.expand_path("~/Library"), "CrashlyticsAndroid")
|
87
|
-
zip_path = File.join(containing, "crashlytics-devtools.zip")
|
88
|
-
jar_path = File.join(containing, "crashlytics-devtools.jar")
|
89
|
-
|
90
|
-
url = "https://ssl-download-crashlytics-com.s3.amazonaws.com/android/ant/crashlytics.zip"
|
91
|
-
require 'net/http'
|
92
|
-
|
93
|
-
FileUtils.mkdir_p(containing)
|
94
|
-
|
95
|
-
begin
|
96
|
-
# Work around ruby defect, where HTTP#get_response and HTTP#post_form don't use ENV proxy settings
|
97
|
-
# https://bugs.ruby-lang.org/issues/12724
|
98
|
-
uri = URI(url)
|
99
|
-
http_conn = Net::HTTP.new(uri.host, uri.port)
|
100
|
-
http_conn.use_ssl = true
|
101
|
-
result = http_conn.request_head(uri.path)
|
102
|
-
|
103
|
-
# ETag is returned with quotes, which net/http does not handle. Clean that up
|
104
|
-
etag = result['ETag'] && result['ETag'].tr('"', '')
|
105
|
-
|
106
|
-
# This is a no-op if the current version on disk matches the file on S3
|
107
|
-
return jar_path if File.exist?(zip_path) && etag == Digest::MD5.file(zip_path).hexdigest
|
108
|
-
|
109
|
-
UI.important("Downloading Crashlytics Support Library - this might take a minute...")
|
110
|
-
result = http_conn.request_get(uri.path)
|
111
|
-
UI.error("#{result.message} (#{result.code})") unless result.kind_of?(Net::HTTPSuccess)
|
112
|
-
File.write(zip_path, result.body)
|
113
|
-
|
114
|
-
# Now unzip the file
|
115
|
-
Action.sh("unzip -o '#{zip_path}' -d '#{containing}'")
|
116
|
-
|
117
|
-
UI.user_error!("Couldn't find 'crashlytics-devtools.jar'") unless File.exist?(jar_path)
|
118
|
-
|
119
|
-
UI.success("Successfully downloaded Crashlytics Support Library to '#{jar_path}'")
|
120
|
-
rescue => ex
|
121
|
-
UI.user_error!("Error fetching remote file: #{ex}")
|
122
|
-
end
|
123
|
-
|
124
|
-
return jar_path
|
125
|
-
end
|
126
|
-
|
127
|
-
def generate_android_manifest_tempfile
|
128
|
-
# We have to generate an empty XML file to make the crashlytics CLI happy :)
|
129
|
-
write_to_tempfile('<?xml version="1.0" encoding="utf-8"?><manifest></manifest>', 'xml')
|
130
|
-
end
|
131
|
-
|
132
|
-
def write_to_tempfile(value, tempfilename)
|
133
|
-
require 'tempfile'
|
134
|
-
|
135
|
-
Tempfile.new(tempfilename).tap do |t|
|
136
|
-
t.write(value)
|
137
|
-
t.close
|
138
|
-
end
|
139
|
-
end
|
140
|
-
end
|
141
|
-
end
|
142
|
-
end
|
143
|
-
end
|
144
|
-
|
145
|
-
# java \
|
146
|
-
# -jar ~/Desktop/crashlytics-devtools.jar \
|
147
|
-
# -androidRes . \
|
148
|
-
# -uploadDist /Users/fkrause/AndroidStudioProjects/AppName/app/build/outputs/apk/app-release.apk \
|
149
|
-
# -androidManifest /Users/fkrause/Downloads/manifest.xml \
|
150
|
-
# -apiKey api_key \
|
151
|
-
# -apiSecret secret_key \
|
152
|
-
|
153
|
-
# -betaDistributionReleaseNotes "Yeah" \
|
154
|
-
# -betaDistributionEmails "something11@krausefx.com" \
|
155
|
-
# -betaDistributionGroupAliases "testgroup" \
|
156
|
-
# -betaDistributionNotifications false
|
157
|
-
# -projectPath . \
|
Binary file
|