Skip to content

Commit c0fa09b

Browse files
committed
Address two comments from last week's PRs (#6774)
1 parent 5e681b5 commit c0fa09b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

ReleaseTooling/Sources/FirebaseReleaser/Tags.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ enum Tags {
4545

4646
private static func createTag(gitRoot: URL, tag: String, deleteExistingTags: Bool) {
4747
if deleteExistingTags {
48-
verifyTagsAreSafeToDelete()
48+
verifyTagsAreSafeToDelete(gitRoot: gitRoot)
4949
Shell.executeCommand("git tag --delete \(tag)", workingDir: gitRoot)
5050
Shell.executeCommand("git push --delete origin \(tag)", workingDir: gitRoot)
5151
} else {
@@ -59,13 +59,17 @@ enum Tags {
5959
/// delete a tag that is being used in production.
6060
/// It works by checking for the existence of the corresponding Firebase podspec in the
6161
/// clone of https://github.com/CocoaPods/Specs
62-
private static func verifyTagsAreSafeToDelete() {
62+
private static func verifyTagsAreSafeToDelete(gitRoot: URL) {
6363
var homeDirURL: URL
6464
if #available(OSX 10.12, *) {
6565
homeDirURL = FileManager.default.homeDirectoryForCurrentUser
6666
} else {
6767
fatalError("Run on at least macOS 10.12")
6868
}
69+
70+
// Make sure that local master spec repo is up to date.
71+
Shell.executeCommand("pod repo update", workingDir: gitRoot)
72+
6973
let manifest = FirebaseManifest.shared
7074
let firebasePublicURL = homeDirURL.appendingPathComponents(
7175
[".cocoapods", "repos", "cocoapods", "Specs", "0", "3", "5", "Firebase"]

ReleaseTooling/Sources/FirebaseReleaser/main.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ struct FirebaseReleaser: ParsableCommand {
2727
transform: URL.init(fileURLWithPath:))
2828
var gitRoot: URL
2929

30+
/// Log commands only and do not make any repository or source changes.
31+
/// Useful for testing and for generating the list of push commands.
3032
@Option(default: false,
3133
help: "Log without executing the shell commands")
3234
var logOnly: Bool

0 commit comments

Comments
 (0)