Merge pull request #159 from TouchInstinct/feature/firebase
use Firebase instead of Fabric
This commit is contained in:
commit
fcf8a3fa5c
|
|
@ -46,24 +46,18 @@ private_lane :installDependencies do |options|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private_lane :uploadToFabric do |options|
|
private_lane :uploadToFirebase do |options|
|
||||||
token, secret = fabric_keys_from_xcodeproj(options[:xcodeproj_path])
|
|
||||||
|
|
||||||
releaseNotesFile = "release-notes.txt"
|
releaseNotesFile = "release-notes.txt"
|
||||||
sh("touch ../#{releaseNotesFile}")
|
sh("touch ../#{releaseNotesFile}")
|
||||||
|
|
||||||
crashlytics(
|
sh("yarn install")
|
||||||
ipa_path: options[:ipa_path],
|
|
||||||
crashlytics_path: "./Pods/Crashlytics/submit",
|
|
||||||
api_token: token,
|
|
||||||
build_secret: secret,
|
|
||||||
notes_path: releaseNotesFile,
|
|
||||||
groups: "touch-instinct"
|
|
||||||
)
|
|
||||||
|
|
||||||
upload_symbols_to_crashlytics(
|
firebase_app_distribution(
|
||||||
dsym_path: options[:dsym_path],
|
app: get_google_app_identifier(options),
|
||||||
api_token: token
|
ipa_path: options[:ipa_path],
|
||||||
|
groups: "touch-instinct",
|
||||||
|
release_notes_file: releaseNotesFile,
|
||||||
|
firebase_cli_path: File.expand_path("../node_modules/firebase-tools/lib/bin/firebase.js")
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -123,7 +117,7 @@ private_lane :buildConfiguration do |options|
|
||||||
syncCodeSigning(options)
|
syncCodeSigning(options)
|
||||||
buildArchive(options)
|
buildArchive(options)
|
||||||
|
|
||||||
uploadToFabric(options)
|
uploadToFirebase(options)
|
||||||
end
|
end
|
||||||
|
|
||||||
if options[:uploadToAppStore]
|
if options[:uploadToAppStore]
|
||||||
|
|
@ -371,12 +365,11 @@ def symbolize_keys(hash)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def fabric_keys_from_xcodeproj(xcodeproj_path)
|
def get_google_app_identifier(options)
|
||||||
fabric_keys_from_shell_script(sh("cat #{xcodeproj_path}/project.pbxproj | grep 'Fabric/run'"))
|
file_name_prefix = options[:type].capitalize
|
||||||
end
|
appName = options[:appName] || $appName
|
||||||
|
file_path = File.expand_path "../#{appName}/Resources/#{file_name_prefix}-GoogleService-Info.plist"
|
||||||
def fabric_keys_from_shell_script(shell_script_contents)
|
get_info_plist_value(path: file_path, key: "GOOGLE_APP_ID")
|
||||||
shell_script_contents.gsub("\\n", "").partition('Fabric/run\" ').last.partition('";').first.split(" ")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_xcconfig_for_configuration_of_project(xcconfig_name, configuration_name, xcodeproj_path)
|
def set_xcconfig_for_configuration_of_project(xcconfig_name, configuration_name, xcodeproj_path)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue