Skip to content

Commit e74765a

Browse files
authored
Canonical directory structure for Functions (#8918)
1 parent eb6ae96 commit e74765a

40 files changed

+71
-98
lines changed

.github/workflows/functions.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: functions
33
on:
44
pull_request:
55
paths:
6-
- 'Functions**'
6+
- 'FirebaseFunctions/**'
77
- '.github/workflows/functions.yml'
88
- 'Interop/Auth/Public/*.h'
99
- 'FirebaseMessaging/Sources/Interop/*.h'
@@ -31,7 +31,7 @@ jobs:
3131
- name: Setup Bundler
3232
run: scripts/setup_bundler.sh
3333
- name: Integration Test Server
34-
run: Functions/Backend/start.sh synchronous
34+
run: FirebaseFunctions/Backend/start.sh synchronous
3535
- name: Build and test
3636
run: |
3737
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseFunctions.podspec \
@@ -119,19 +119,20 @@ jobs:
119119
- name: Setup Bundler
120120
run: scripts/setup_bundler.sh
121121
- name: Integration Test Server
122-
run: Functions/Backend/start.sh synchronous
122+
run: FirebaseFunctions/Backend/start.sh synchronous
123123
- name: PodLibLint Functions Cron
124124
run: |
125125
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
126126
FirebaseFunctions.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
127127
128-
podspec-presubmit:
128+
#TODO - reenable once there's a tag with the new directory structure. See #8918 and #8299
129+
# podspec-presubmit:
129130
# Don't run on private repo unless it is a PR.
130-
if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
131-
runs-on: macos-11
132-
steps:
133-
- uses: actions/checkout@v2
134-
- name: Setup Bundler
135-
run: scripts/setup_bundler.sh
136-
- name: Build and test
137-
run: scripts/third_party/travis/retry.sh pod spec lint FirebaseFunctions.podspec --skip-tests --sources='https://github.com/firebase/SpecsTesting','https://github.com/firebase/SpecsDev.git','https://github.com/firebase/SpecsStaging.git','https://cdn.cocoapods.org/'
131+
# if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
132+
# runs-on: macos-11
133+
# steps:
134+
# - uses: actions/checkout@v2
135+
# - name: Setup Bundler
136+
# run: scripts/setup_bundler.sh
137+
# - name: Build and test
138+
# run: scripts/third_party/travis/retry.sh pod spec lint FirebaseFunctions.podspec --skip-tests --sources='https://github.com/firebase/SpecsTesting','https://github.com/firebase/SpecsDev.git','https://github.com/firebase/SpecsStaging.git','https://cdn.cocoapods.org/'

Dangerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ has_license_changes = didModify(["LICENSE"])
9292
@has_dynamiclinks_api_changes = hasChangesIn("FirebaseDynamicLinks/Sources/Public/")
9393
@has_firestore_changes = hasChangesIn(["Firestore/", "FirebaseFirestore.podspec"])
9494
@has_firestore_api_changes = hasChangesIn("Firestore/Source/Public/")
95-
@has_functions_changes = hasChangesIn(["Functions/", "FirebaseFunctions.podspec"])
96-
@has_functions_api_changes = hasChangesIn("Functions/FirebaseFunctions/Public/")
95+
@has_functions_changes = hasChangesIn(["FirebaseFunctions/", "FirebaseFunctions.podspec"])
96+
@has_functions_api_changes = hasChangesIn("FirebaseFunctions/Sources/Public/")
9797
@has_inappmessaging_changes = hasChangesIn(["FirebaseInAppMessaging"])
9898
@has_inappmessaging_api_changes = hasChangesIn(["FirebaseInAppMessaging/Sources/Public/"])
9999
@has_installations_changes = hasChangesIn("FirebaseInstallations")

FirebaseCombineSwift/Tests/Unit/FirebaseCombine-unit-Bridging-Header.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
2323

2424
// Firebase Functions
25-
#import "Functions/FirebaseFunctions/FIRFunctions+Internal.h"
25+
#import "FirebaseFunctions/Sources/FIRFunctions+Internal.h"
2626

2727
// Firebase Auth
2828
#import <FirebaseAuth/FIRAuth.h>

FirebaseFunctions.podspec

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ Cloud Functions for Firebase.
2424
s.prefix_header_file = false
2525

2626
s.source_files = [
27-
'Functions/FirebaseFunctions/**/*',
27+
'FirebaseFunctions/Sources/**/*',
2828
'Interop/Auth/Public/*.h',
2929
'FirebaseAppCheck/Sources/Interop/*.h',
3030
'FirebaseCore/Sources/Private/*.h',
3131
'FirebaseMessaging/Sources/Interop/FIRMessagingInterop.h',
3232
]
33-
s.public_header_files = 'Functions/FirebaseFunctions/Public/FirebaseFunctions/*.h'
33+
s.public_header_files = 'FirebaseFunctions/Sources/Public/FirebaseFunctions/*.h'
3434

3535
s.dependency 'FirebaseCore', '~> 8.0'
3636
s.dependency 'GTMSessionFetcher/Core', '~> 1.5'
@@ -43,8 +43,8 @@ Cloud Functions for Firebase.
4343
s.test_spec 'unit' do |unit_tests|
4444
unit_tests.scheme = { :code_coverage => true }
4545
unit_tests.source_files = [
46-
'Functions/Example/Test*/*.[mh]',
47-
'Functions/Tests/Unit/Swift/**/*',
46+
'FirebaseFunctions/Tests/Unit/*.[mh]',
47+
'FirebaseFunctions/Tests/SwiftUnit/**/*',
4848
'SharedTestUtilities/FIRAuthInteropFake*',
4949
'SharedTestUtilities/FIRMessagingInteropFake*',
5050
'SharedTestUtilities/AppCheckFake/*.[mh]',
@@ -53,10 +53,9 @@ Cloud Functions for Firebase.
5353

5454
s.test_spec 'integration' do |int_tests|
5555
int_tests.scheme = { :code_coverage => true }
56-
int_tests.source_files = 'Functions/Example/IntegrationTests/*.[mh]',
57-
'Functions/Example/TestUtils/*.[mh]',
56+
int_tests.source_files = 'FirebaseFunctions/Tests/Integration/*.[mh]',
57+
'FirebaseFunctions/Tests/Integration/*.plist',
5858
'SharedTestUtilities/FIRAuthInteropFake*',
59-
'SharedTestUtilities/FIRMessagingInteropFake*',
60-
'Functions/Example/GoogleService-Info.plist'
59+
'SharedTestUtilities/FIRMessagingInteropFake*'
6160
end
6261
end
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Functions/FirebaseFunctions/FIRFunctions+Internal.h renamed to FirebaseFunctions/Sources/FIRFunctions+Internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#import <Foundation/Foundation.h>
1616

17-
#import "Functions/FirebaseFunctions/Public/FirebaseFunctions/FIRFunctions.h"
17+
#import "FirebaseFunctions/Sources/Public/FirebaseFunctions/FIRFunctions.h"
1818

1919
@protocol FIRAppCheckInterop;
2020
@protocol FIRAuthInterop;

0 commit comments

Comments
 (0)