Skip to content

Commit

Permalink
fix(core, ios): ensure iOS SDK version can be found from Package.swift (
Browse files Browse the repository at this point in the history
  • Loading branch information
russellwheatley authored Nov 7, 2024
1 parent ae0197f commit 83f4dad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
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

0 comments on commit 83f4dad

Please sign in to comment.