61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
# File 'lib/fastlane/actions/crashlytics.rb', line 61
def self.available_options
platform = Actions.lane_context[Actions::SharedValues::PLATFORM_NAME]
if platform == :ios or platform.nil?
ipa_path_default = Dir["*.ipa"].last
end
if platform == :android
apk_path_default = Dir["*.apk"].last || Dir[File.join("app", "build", "outputs", "apk", "app-release.apk")].last
end
[
FastlaneCore::ConfigItem.new(key: :ipa_path,
env_name: "CRASHLYTICS_IPA_PATH",
description: "Path to your IPA file. Optional if you use the `gym` or `xcodebuild` action",
default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] || ipa_path_default,
optional: true,
verify_block: proc do |value|
UI.user_error!("Couldn't find ipa file at path '#{value}'") unless File.exist?(value)
end),
FastlaneCore::ConfigItem.new(key: :apk_path,
env_name: "CRASHLYTICS_APK_PATH",
description: "Path to your APK file",
default_value: Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH] || apk_path_default,
optional: true,
verify_block: proc do |value|
UI.user_error!("Couldn't find apk file at path '#{value}'") unless File.exist?(value)
end),
FastlaneCore::ConfigItem.new(key: :crashlytics_path,
env_name: "CRASHLYTICS_FRAMEWORK_PATH",
description: "Path to the submit binary in the Crashlytics bundle (iOS) or `crashlytics-devtools.jar` file (Android)",
optional: true,
verify_block: proc do |value|
UI.user_error!("Couldn't find crashlytics at path '#{File.expand_path(value)}'`") unless File.exist?(File.expand_path(value))
end),
FastlaneCore::ConfigItem.new(key: :api_token,
env_name: "CRASHLYTICS_API_TOKEN",
description: "Crashlytics Beta API Token",
verify_block: proc do |value|
UI.user_error!("No API token for Crashlytics given, pass using `api_token: 'token'`") unless value && !value.empty?
end),
FastlaneCore::ConfigItem.new(key: :build_secret,
env_name: "CRASHLYTICS_BUILD_SECRET",
description: "Crashlytics Build Secret",
verify_block: proc do |value|
UI.user_error!("No build secret for Crashlytics given, pass using `build_secret: 'secret'`") unless value && !value.empty?
end),
FastlaneCore::ConfigItem.new(key: :notes_path,
env_name: "CRASHLYTICS_NOTES_PATH",
description: "Path to the release notes",
optional: true,
verify_block: proc do |value|
UI.user_error!("Path '#{value}' not found") unless File.exist?(value)
end),
FastlaneCore::ConfigItem.new(key: :notes,
env_name: "CRASHLYTICS_NOTES",
description: "The release notes as string - uses :notes_path under the hood",
optional: true,
is_string: true),
FastlaneCore::ConfigItem.new(key: :groups,
env_name: "CRASHLYTICS_GROUPS",
description: "The groups used for distribution, separated by commas",
optional: true,
is_string: false),
FastlaneCore::ConfigItem.new(key: :emails,
env_name: "CRASHLYTICS_EMAILS",
description: "Pass email addresses of testers, separated by commas",
optional: true,
is_string: false),
FastlaneCore::ConfigItem.new(key: :notifications,
env_name: "CRASHLYTICS_NOTIFICATIONS",
description: "Crashlytics notification option (true/false)",
default_value: true,
is_string: false),
FastlaneCore::ConfigItem.new(key: :debug,
env_name: "CRASHLYTICS_DEBUG",
description: "Crashlytics debug option (true/false)",
default_value: false,
is_string: false)
]
end
|