fastlane 2.194.0 → 2.195.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +84 -84
  3. data/fastlane/lib/fastlane/actions/gradle.rb +15 -2
  4. data/fastlane/lib/fastlane/actions/last_git_commit.rb +1 -1
  5. data/fastlane/lib/fastlane/actions/prompt.rb +1 -1
  6. data/fastlane/lib/fastlane/version.rb +1 -1
  7. data/fastlane/swift/Deliverfile.swift +1 -1
  8. data/fastlane/swift/DeliverfileProtocol.swift +1 -1
  9. data/fastlane/swift/Fastlane.swift +38 -67
  10. data/fastlane/swift/Gymfile.swift +1 -1
  11. data/fastlane/swift/GymfileProtocol.swift +1 -1
  12. data/fastlane/swift/Matchfile.swift +1 -1
  13. data/fastlane/swift/MatchfileProtocol.swift +9 -1
  14. data/fastlane/swift/Precheckfile.swift +1 -1
  15. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  16. data/fastlane/swift/Scanfile.swift +1 -1
  17. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  18. data/fastlane/swift/Screengrabfile.swift +1 -1
  19. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  20. data/fastlane/swift/Snapshotfile.swift +1 -1
  21. data/fastlane/swift/SnapshotfileProtocol.swift +2 -2
  22. data/fastlane/swift/formatting/Brewfile.lock.json +3 -3
  23. data/match/lib/match/generator.rb +2 -1
  24. data/match/lib/match/options.rb +10 -0
  25. data/match/lib/match/runner.rb +94 -10
  26. data/sigh/lib/sigh/options.rb +5 -0
  27. data/sigh/lib/sigh/runner.rb +2 -2
  28. data/snapshot/lib/snapshot/options.rb +1 -1
  29. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +7 -0
  30. metadata +21 -24
  31. data/fastlane/lib/fastlane/actions/.notarize.rb.swp +0 -0
  32. data/fastlane/lib/fastlane/actions/crashlytics.rb +0 -207
  33. data/fastlane/lib/fastlane/helper/crashlytics_helper.rb +0 -157
@@ -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 . \