Skip to content

Commit ec3386a

Browse files
authored
[Infra] Exclude pods that aren't releasing in GHAMatrixSpecCollector (#14119)
1 parent b91dfda commit ec3386a

File tree

5 files changed

+6
-11
lines changed

5 files changed

+6
-11
lines changed

.github/workflows/cocoapods-integration.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
tests:
1919
# Don't run on private repo unless it is a PR.
2020
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
21+
|| github.event_name == 'workflow_dispatch'
2122

2223
runs-on: macos-14
2324
steps:

.github/workflows/notice_generation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
jobs:
1212
generate_a_notice:
1313
# Don't run on private repo.
14-
if: github.repository == 'Firebase/firebase-ios-sdk'
14+
if: github.repository == 'Firebase/firebase-ios-sdk' || github.event_name == 'workflow_dispatch'
1515
runs-on: macos-14
1616
name: Generate NOTICES
1717
env:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
buildup_SpecsReleasing_repo:
108108
needs: [buildup_SpecsReleasing_repo_FirebaseCore, specs_checking]
109109
# Don't run on private repo unless it is a PR.
110-
if: github.repository == 'Firebase/firebase-ios-sdk'
110+
if: github.repository == 'Firebase/firebase-ios-sdk' || github.event_name == 'workflow_dispatch'
111111
runs-on: macos-14
112112
strategy:
113113
fail-fast: false

ReleaseTooling/Sources/ManifestParser/GHAMatrixSpecCollector.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,10 @@ struct SDKPodspec: Codable {
3131
struct GHAMatrixSpecCollector {
3232
var SDKRepoURL: URL
3333
var outputSpecFileURL: URL
34-
var excludedSDKs: [String] = []
3534

3635
func getPodsInManifest(_ manifest: Manifest) -> [String: SDKPodspec] {
3736
var podsMap: [String: SDKPodspec] = [:]
38-
for pod in manifest.pods {
37+
for pod in manifest.pods.filter({ $0.releasing }) {
3938
podsMap[pod.name] = SDKPodspec(podspec: pod.name, allowWarnings: pod.allowWarnings)
4039
}
4140
return podsMap

ReleaseTooling/Sources/ManifestParser/main.swift

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,12 @@ struct ManifestParser: ParsableCommand {
4242
})
4343
var outputFilePath: URL
4444

45-
@Option(parsing: .upToNextOption, help: "Podspec files that will not be included.")
46-
var excludedSpecs: [String]
47-
4845
@Flag(help: "Parsing mode for manifest")
4946
var mode: ParsingMode
5047

5148
func parsePodNames(_ manifest: Manifest) throws {
5249
var output: [String] = []
53-
for pod in manifest.pods {
50+
for pod in manifest.pods.filter({ $0.releasing }) {
5451
output.append(pod.name)
5552
}
5653
do {
@@ -69,9 +66,7 @@ struct ManifestParser: ParsableCommand {
6966
try parsePodNames(FirebaseManifest.shared)
7067
case .forGHAMatrixGeneration:
7168
guard let sdkRepoURL = SDKRepoURL else {
72-
throw fatalError(
73-
"--sdk-repo-url should be specified when --for-gha-matrix-generation is on."
74-
)
69+
fatalError("--sdk-repo-url should be specified when --for-gha-matrix-generation is on.")
7570
}
7671
let specCollector = GHAMatrixSpecCollector(
7772
SDKRepoURL: sdkRepoURL,

0 commit comments

Comments
 (0)