Skip to content

Commit bb688ad

Browse files
committed
tools/upgrade [nfc]: Push check_have_cocoapods down into each step
This will be convenient for adding a new step that doesn't require CocoaPods. The check is very fast, so unlike with check_pub_get_clean there's no need to memoize the result.
1 parent 8f1d563 commit bb688ad

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/upgrade

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ check_pub_get_clean() {
111111

112112
just_pod_update() {
113113
[ -z "${opt_pod}" ] && return;
114+
check_have_cocoapods
114115

115116
run_visibly pod update --project-directory=ios/
116117
run_visibly pod update --project-directory=macos/
@@ -123,6 +124,7 @@ upgrade_pod() {
123124
return
124125
fi
125126

127+
check_have_cocoapods
126128
check_no_uncommitted_or_untracked
127129
check_pub_get_clean
128130

@@ -138,6 +140,7 @@ deps: Update CocoaPods pods (tools/upgrade pod)
138140
}
139141

140142
upgrade_pub() {
143+
check_have_cocoapods
141144
check_no_uncommitted_or_untracked
142145
check_pub_get_clean
143146

@@ -170,6 +173,7 @@ deps: Upgrade packages within constraints (tools/upgrade pub)
170173
}
171174

172175
upgrade_pub_major() {
176+
check_have_cocoapods
173177
check_no_uncommitted_or_untracked
174178
check_pub_get_clean
175179

@@ -221,8 +225,6 @@ EOF
221225
fi
222226
}
223227

224-
check_have_cocoapods
225-
226228
divider_line='================================================================'
227229

228230
for step in "${opt_steps[@]}"; do

0 commit comments

Comments
 (0)