Skip to content

Commit

Permalink
[Infra] Exclude pods that aren't releasing in GHAMatrixSpecCollector (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewheard authored Nov 14, 2024
1 parent b91dfda commit ec3386a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cocoapods-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
tests:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
|| github.event_name == 'workflow_dispatch'

runs-on: macos-14
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/notice_generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
generate_a_notice:
# Don't run on private repo.
if: github.repository == 'Firebase/firebase-ios-sdk'
if: github.repository == 'Firebase/firebase-ios-sdk' || github.event_name == 'workflow_dispatch'
runs-on: macos-14
name: Generate NOTICES
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
buildup_SpecsReleasing_repo:
needs: [buildup_SpecsReleasing_repo_FirebaseCore, specs_checking]
# Don't run on private repo unless it is a PR.
if: github.repository == 'Firebase/firebase-ios-sdk'
if: github.repository == 'Firebase/firebase-ios-sdk' || github.event_name == 'workflow_dispatch'
runs-on: macos-14
strategy:
fail-fast: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ struct SDKPodspec: Codable {
struct GHAMatrixSpecCollector {
var SDKRepoURL: URL
var outputSpecFileURL: URL
var excludedSDKs: [String] = []

func getPodsInManifest(_ manifest: Manifest) -> [String: SDKPodspec] {
var podsMap: [String: SDKPodspec] = [:]
for pod in manifest.pods {
for pod in manifest.pods.filter({ $0.releasing }) {
podsMap[pod.name] = SDKPodspec(podspec: pod.name, allowWarnings: pod.allowWarnings)
}
return podsMap
Expand Down
9 changes: 2 additions & 7 deletions ReleaseTooling/Sources/ManifestParser/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,12 @@ struct ManifestParser: ParsableCommand {
})
var outputFilePath: URL

@Option(parsing: .upToNextOption, help: "Podspec files that will not be included.")
var excludedSpecs: [String]

@Flag(help: "Parsing mode for manifest")
var mode: ParsingMode

func parsePodNames(_ manifest: Manifest) throws {
var output: [String] = []
for pod in manifest.pods {
for pod in manifest.pods.filter({ $0.releasing }) {
output.append(pod.name)
}
do {
Expand All @@ -69,9 +66,7 @@ struct ManifestParser: ParsableCommand {
try parsePodNames(FirebaseManifest.shared)
case .forGHAMatrixGeneration:
guard let sdkRepoURL = SDKRepoURL else {
throw fatalError(
"--sdk-repo-url should be specified when --for-gha-matrix-generation is on."
)
fatalError("--sdk-repo-url should be specified when --for-gha-matrix-generation is on.")
}
let specCollector = GHAMatrixSpecCollector(
SDKRepoURL: sdkRepoURL,
Expand Down

0 comments on commit ec3386a

Please sign in to comment.