Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ enum ConfigurationError: Error {
case invalidFormat(String)
}

let macosRootDirectory = String(URL(string: #file)!.deletingLastPathComponent().absoluteString
let firebaseCoreDirectory = String(URL(string: #file)!.deletingLastPathComponent().absoluteString
.dropLast())

func loadPubspecVersion() throws -> String {
let pubspecPath = NSString.path(withComponents: [macosRootDirectory, "..", "..", "pubspec.yaml"])
let pubspecPath = NSString.path(withComponents: [
firebaseCoreDirectory,
"..",
"..",
"pubspec.yaml",
])
do {
let yamlString = try String(contentsOfFile: pubspecPath, encoding: .utf8)
if let versionLine = yamlString.split(separator: "\n")
Expand All @@ -35,11 +40,9 @@ func loadPubspecVersion() throws -> String {

func loadFirebaseSDKVersion() throws -> String {
let firebaseCoreScriptPath = NSString.path(withComponents: [
macosRootDirectory,
"..",
firebaseCoreDirectory,
"..",
"..",
"firebase_core",
"ios",
"firebase_sdk_version.rb",
])
Expand Down
Loading