Skip to content

Commit c7f1145

Browse files
authored
Fix and rewrite sync_project.rb (#3296)
* Fix and rewrite sync_project.rb Ever since we added multiple platforms, removing a file has been broken. This fixes that issue. Also, rewrite target synchronization to make more sense. Essentially now there's one diff between the filesystem and the groups and then an explicit diff is done between project files and target contents. * Run sync_project.rb on post-install
1 parent da6e8e5 commit c7f1145

File tree

4 files changed

+284
-193
lines changed

4 files changed

+284
-193
lines changed

Firestore/Example/Firestore.xcodeproj/project.pbxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3642,6 +3642,7 @@
36423642
isa = PBXSourcesBuildPhase;
36433643
buildActionMask = 2147483647;
36443644
files = (
3645+
124C933122C16ACB00CA8C2D /* CodableIntegrationTests.swift in Sources */,
36453646
73866AA12082B0A5009BB4FF /* FIRArrayTransformTests.mm in Sources */,
36463647
5492E079202154D600B64F25 /* FIRCursorTests.mm in Sources */,
36473648
5492E075202154D600B64F25 /* FIRDatabaseTests.mm in Sources */,

Firestore/Example/Podfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2+
require 'pathname'
3+
14
# Uncomment the next two lines for pre-release testing on internal repo
25
#source 'sso://cpdc-internal/firebase'
36
#source 'https://cdn.cocoapods.org/'
@@ -6,6 +9,13 @@ source 'https://cdn.cocoapods.org/'
69

710
use_frameworks!
811

12+
13+
post_install do |installer|
14+
sync = Pathname.new(__FILE__).dirname.join('../../scripts/sync_project.rb')
15+
system(sync.to_s)
16+
end
17+
18+
919
target 'Firestore_Example_iOS' do
1020
platform :ios, '8.0'
1121

scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ case "$product-$method-$platform" in
316316

317317
# Firestore_IntegrationTests_iOS require Swift 4, which needs Xcode 9
318318
# Other non-iOS platforms don't have swift integration tests yet.
319-
if [["$platform" != 'iOS' || "$xcode_major" -ge 9 ]]; then
319+
if [[ "$platform" != 'iOS' || "$xcode_major" -ge 9 ]]; then
320320
RunXcodebuild \
321321
-workspace 'Firestore/Example/Firestore.xcworkspace' \
322322
-scheme "Firestore_IntegrationTests_$platform" \

0 commit comments

Comments
 (0)