@@ -36,12 +36,20 @@ The steps are:
36
36
then upgrade pods to match. If there are any changes
37
37
here, the resulting commit is only a draft and requires
38
38
human editing and review.
39
+
40
+ Options:
41
+
42
+ --no-pod Skip running CocoaPods. This is convenient for
43
+ drafting a branch on Linux.
39
44
EOF
40
45
}
41
46
47
+ opt_pod=y
42
48
opt_steps=()
43
49
while (( $# )) ; do
44
50
case " $1 " in
51
+ --no-pod)
52
+ opt_pod=; shift ;;
45
53
pod|pub|pub-major)
46
54
opt_steps+=(" $1 " ); shift ;;
47
55
--help) usage; exit 0;;
@@ -60,6 +68,8 @@ rootdir=$(git rev-parse --show-toplevel)
60
68
cd " $rootdir "
61
69
62
70
check_have_cocoapods () {
71
+ [ -z " ${opt_pod} " ] && return ;
72
+
63
73
if ! type pod > /dev/null; then
64
74
echo >&2 " No \` pod\` command found."
65
75
echo >&2
@@ -100,11 +110,19 @@ check_pub_get_clean() {
100
110
}
101
111
102
112
just_pod_update () {
113
+ [ -z " ${opt_pod} " ] && return ;
114
+
103
115
run_visibly pod update --project-directory=ios/
104
116
run_visibly pod update --project-directory=macos/
105
117
}
106
118
107
119
upgrade_pod () {
120
+ if [ -z " ${opt_pod} " ]; then
121
+ echo >&2
122
+ echo >&2 " pod update: WARNING: skipping because --no-pod"
123
+ return
124
+ fi
125
+
108
126
check_no_uncommitted_or_untracked
109
127
check_pub_get_clean
110
128
@@ -144,6 +162,11 @@ upgrade_pub() {
144
162
git commit -a -m " \
145
163
deps: Upgrade packages within constraints (tools/upgrade pub)
146
164
"
165
+
166
+ if [ -z " ${opt_pod} " ]; then
167
+ echo >&2
168
+ echo >&2 " flutter pub upgrade: WARNING: Podfile.lock files may be out of date because --no-pod"
169
+ fi
147
170
}
148
171
149
172
upgrade_pub_major () {
@@ -191,6 +214,11 @@ To finish the upgrade:
191
214
If several unrelated packages were upgraded, and any of them require
192
215
changes in our code, consider upgrading them in separate commits.
193
216
EOF
217
+
218
+ if [ -z " ${opt_pod} " ]; then
219
+ echo >&2
220
+ echo >&2 " flutter pub upgrade --major-versions: WARNING: Podfile.lock files may be out of date because --no-pod"
221
+ fi
194
222
}
195
223
196
224
check_have_cocoapods
0 commit comments