Skip to content

Commit 5baf037

Browse files
authored
Update Package.swift for CI. (#9297)
Update GoogleAppMeasurement for CI
1 parent f1e235b commit 5baf037

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.github/workflows/functions.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ jobs:
4545
# Don't run on private repo unless it is a PR.
4646
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
4747
runs-on: macos-11
48+
env:
49+
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
4850
steps:
4951
- uses: actions/checkout@v2
5052
- uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077

Package.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// limitations under the License.
1717

1818
import PackageDescription
19+
import class Foundation.ProcessInfo
1920

2021
let firebaseVersion = "8.12.0"
2122

@@ -1195,3 +1196,14 @@ let package = Package(
11951196
cLanguageStandard: .c99,
11961197
cxxLanguageStandard: CXXLanguageStandard.gnucxx14
11971198
)
1199+
1200+
if ProcessInfo.processInfo.environment["FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT"] != nil {
1201+
if let GoogleAppMeasurementIndex = package.dependencies
1202+
.firstIndex(where: { $0.name == "GoogleAppMeasurement" }) {
1203+
package.dependencies[GoogleAppMeasurementIndex] = .package(
1204+
name: "GoogleAppMeasurement",
1205+
url: "https://github.com/google/GoogleAppMeasurement.git",
1206+
.branch("main")
1207+
)
1208+
}
1209+
}

0 commit comments

Comments
 (0)