@@ -36,12 +36,20 @@ The steps are:
3636 then upgrade pods to match. If there are any changes
3737 here, the resulting commit is only a draft and requires
3838 human editing and review.
39+
40+ Options:
41+
42+ --no-pod Skip running CocoaPods. This is convenient for
43+ drafting a branch on Linux.
3944EOF
4045}
4146
47+ opt_pod=y
4248opt_steps=()
4349while (( $# )) ; do
4450 case " $1 " in
51+ --no-pod)
52+ opt_pod=; shift ;;
4553 pod|pub|pub-major)
4654 opt_steps+=(" $1 " ); shift ;;
4755 --help) usage; exit 0;;
@@ -60,6 +68,8 @@ rootdir=$(git rev-parse --show-toplevel)
6068cd " $rootdir "
6169
6270check_have_cocoapods () {
71+ [ -z " ${opt_pod} " ] && return ;
72+
6373 if ! type pod > /dev/null; then
6474 echo >&2 " No \` pod\` command found."
6575 echo >&2
@@ -100,11 +110,19 @@ check_pub_get_clean() {
100110}
101111
102112just_pod_update () {
113+ [ -z " ${opt_pod} " ] && return ;
114+
103115 run_visibly pod update --project-directory=ios/
104116 run_visibly pod update --project-directory=macos/
105117}
106118
107119upgrade_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+
108126 check_no_uncommitted_or_untracked
109127 check_pub_get_clean
110128
@@ -144,6 +162,11 @@ upgrade_pub() {
144162 git commit -a -m " \
145163deps: Upgrade packages within constraints (tools/upgrade pub)
146164"
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
147170}
148171
149172upgrade_pub_major () {
@@ -191,6 +214,11 @@ To finish the upgrade:
191214If several unrelated packages were upgraded, and any of them require
192215changes in our code, consider upgrading them in separate commits.
193216EOF
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
194222}
195223
196224check_have_cocoapods
0 commit comments