Skip to content

Commit ab758f2

Browse files
authored
Speed up retagging (#6806)
1 parent c887ea1 commit ab758f2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ReleaseTooling/Sources/FirebaseReleaser/Tags.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ import Utils
2121

2222
enum Tags {
2323
static func createTags(gitRoot: URL, deleteExistingTags: Bool = false) {
24+
if deleteExistingTags {
25+
verifyTagsAreSafeToDelete(gitRoot: gitRoot)
26+
}
2427
let manifest = FirebaseManifest.shared
2528
createTag(gitRoot: gitRoot, tag: "CocoaPods-\(manifest.version)",
2629
deleteExistingTags: deleteExistingTags)
@@ -45,7 +48,6 @@ enum Tags {
4548

4649
private static func createTag(gitRoot: URL, tag: String, deleteExistingTags: Bool) {
4750
if deleteExistingTags {
48-
verifyTagsAreSafeToDelete(gitRoot: gitRoot)
4951
Shell.executeCommand("git tag --delete \(tag)", workingDir: gitRoot)
5052
Shell.executeCommand("git push --delete origin \(tag)", workingDir: gitRoot)
5153
} else {

0 commit comments

Comments
 (0)