Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core, ios): ensure iOS SDK version can be found from Package.swift #13804

Merged
merged 3 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions .github/workflows/all_plugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
"flutter build web"
swift-integration:
runs-on: macos-latest
timeout-minutes: 10
timeout-minutes: 30
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225
Expand All @@ -135,10 +135,10 @@ jobs:
with:
melos-version: '5.3.0'
- name: 'Swift Integration Setup'
run: flutter config --enable-swift-package-manager
run: flutter config --enable-swift-package-manager
- name: 'Build Apps with Swift Package Manager'
run: ./.github/workflows/scripts/swift-integration.sh

test:
runs-on: ubuntu-latest
timeout-minutes: 30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ enum ConfigurationError: Error {
case invalidFormat(String)
}

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

func loadPubspecVersion() throws -> String {
let pubspecPath = NSString.path(withComponents: [iosRootDirectory, "..", "..", "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,12 +40,8 @@ func loadPubspecVersion() throws -> String {

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