Skip to content

Commit bb3b957

Browse files
committed
Stage to SpecsStaging instead of cpdc (#7556)
1 parent ead5ff0 commit bb3b957

File tree

3 files changed

+13
-28
lines changed

3 files changed

+13
-28
lines changed

ReleaseTooling/DEVELOP.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ If the `--zip-pods` option is not specified, the tool will build a Firebase zip
1616

1717
For release engineers (Googlers packaging an upcoming Firebase release) these commands should also
1818
be used:
19-
- `--custom-spec-repos sso://cpdc-internal/firebase`
19+
- `--custom-spec-repos https://github.com/firebase/SpecsStaging.git`
2020
- This pulls the latest podspecs from the CocoaPods staging area.
2121
- `--enable-carthage-build` Turns on generation of Carthage zips and json file updates.
2222
- `--keep-build-artifacts` Useful for debugging and verifying the zip build contents.
@@ -25,7 +25,7 @@ Putting them all together, here's a common command to build a releaseable Zip fi
2525

2626
```
2727
swift run zip-builder --update-pod-repo \
28-
--custom-spec-repos sso://cpdc-internal/firebase \
28+
--custom-spec-repos https://github.com/firebase/SpecsStaging.git \
2929
--enable-carthage-build \
3030
--keep-build-artifacts
3131
```

ReleaseTooling/Sources/FirebaseReleaser/Push.swift

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,19 @@ import FirebaseManifest
2020
import Utils
2121

2222
private enum Destination {
23-
case cpdc, trunk
23+
case staging, trunk
2424
}
2525

2626
enum Push {
27-
static func pushPodsToCPDC(gitRoot: URL) {
28-
push(to: .cpdc, gitRoot: gitRoot)
27+
static func pushPodsToStaging(gitRoot: URL) {
28+
push(to: .staging, gitRoot: gitRoot)
2929
}
3030

3131
static func publishPodsToTrunk(gitRoot: URL) {
3232
push(to: .trunk, gitRoot: gitRoot)
3333
}
3434

3535
private static func push(to destination: Destination, gitRoot: URL) {
36-
let cpdcRepo = "sso://cpdc-internal/firebase"
37-
let cpdcLocation = findOrRegisterPrivateCocoaPodsRepo(
38-
repo: cpdcRepo,
39-
gitRoot: gitRoot,
40-
defaultRepoName: "cpdc-internal-firebase"
41-
)
4236
let stagingRepo = "[email protected]:firebase/SpecsStaging"
4337
let stagingLocation = findOrRegisterPrivateCocoaPodsRepo(
4438
repo: stagingRepo,
@@ -52,23 +46,14 @@ enum Push {
5246

5347
let command: String = {
5448
switch destination {
55-
case .cpdc:
56-
var pushCommands = ""
57-
if pod.isClosedSource {
58-
// Push closed source pods to SpecsStaging to keep CI working.
59-
pushCommands =
60-
"pod repo push --skip-tests --use-json \(warningsOK) \(stagingLocation) " +
61-
pod.skipImportValidation() + " \(pod.podspecName()) " +
62-
"--sources=\(stagingRepo).git,https://cdn.cocoapods.org && "
63-
}
64-
pushCommands += "pod repo push --skip-tests --use-json \(warningsOK) \(cpdcLocation) " +
49+
case .staging:
50+
return "pod repo push --skip-tests --use-json \(warningsOK) \(stagingLocation) " +
6551
pod.skipImportValidation() + " \(pod.podspecName()) " +
66-
"--sources=\(cpdcRepo).git,https://cdn.cocoapods.org"
67-
return pushCommands
68-
52+
"--sources=\(stagingRepo).git,https://cdn.cocoapods.org"
6953
case .trunk:
7054
return "pod trunk push --skip-tests --synchronous \(warningsOK) " +
71-
pod.skipImportValidation() + " ~/.cocoapods/repos/\(cpdcLocation)/Specs/\(pod.name)/" +
55+
pod
56+
.skipImportValidation() + " ~/.cocoapods/repos/\(stagingLocation)/Specs/\(pod.name)/" +
7257
"\(manifest.versionString(pod))/\(pod.name).podspec.json"
7358
}
7459
}()

ReleaseTooling/Sources/FirebaseReleaser/main.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ struct FirebaseReleaser: ParsableCommand {
4343
help: "Publish the podspecs to the CocoaPodsTrunk")
4444
var publish: Bool
4545

46-
/// Set this option to only update the podspecs on cpdc.
46+
/// Set this option to only update the podspecs on SpecsStaging.
4747
@Option(default: false,
4848
help: "Update the podspecs only")
4949
var pushOnly: Bool
@@ -72,11 +72,11 @@ struct FirebaseReleaser: ParsableCommand {
7272
Shell.executeCommand("git branch --set-upstream-to=origin/\(branch) \(branch)",
7373
workingDir: gitRoot)
7474
Tags.createTags(gitRoot: gitRoot)
75-
Push.pushPodsToCPDC(gitRoot: gitRoot)
75+
Push.pushPodsToStaging(gitRoot: gitRoot)
7676
} else if updateTagsOnly {
7777
Tags.updateTags(gitRoot: gitRoot)
7878
} else if pushOnly {
79-
Push.pushPodsToCPDC(gitRoot: gitRoot)
79+
Push.pushPodsToStaging(gitRoot: gitRoot)
8080
} else if publish {
8181
Push.publishPodsToTrunk(gitRoot: gitRoot)
8282
}

0 commit comments

Comments
 (0)