Skip to content

Commit 011615a

Browse files
rajveermalviyagnprice
authored andcommitted
check: Remove the Flutter version name check
Flutter upstream changed it's version number format so this check will need to be updated to accommodate for that, but we leave that as a follow up (see zulip#1851). So, remove this check for now.
1 parent 81e0f36 commit 011615a

File tree

1 file changed

+1
-36
lines changed

1 file changed

+1
-36
lines changed

tools/check

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -249,42 +249,7 @@ run_flutter_version() {
249249
flutter_version="${parsed[0]}"
250250
flutter_commit="${parsed[1]}"
251251

252-
# Check the version name matches the commit ID.
253-
local commit_described predicted_version
254-
commit_described=$(
255-
"${flutter_git[@]}" describe --tags "${flutter_commit}"
256-
) || return
257-
predicted_version=$(
258-
echo "${commit_described}" \
259-
| perl -lne 'print if (s
260-
# This transformation is ad hoc.
261-
# If we find cases where it fails, we can study
262-
# how the `flutter` tool actually decides the version name.
263-
<^(\d+\.\d+\.\d+-) (\d+) (\.\d+\.pre) -(\d+) -g[0-9a-f]+$>
264-
<$1 . ($2 + 1) . $3 . "-" . $4>xe)'
265-
) || return
266-
if [ -z "${predicted_version}" ]; then
267-
cat >&2 <<EOF
268-
error: unexpected 'git describe' result on Flutter commit in pubspec.yaml
269-
Commit ${flutter_commit} was described as: ${commit_described}
270-
EOF
271-
return 1
272-
fi
273-
if [ "${flutter_version}" != "${predicted_version}" ]; then
274-
# Before 2025-07 (https://github.com/flutter/flutter/pull/172141),
275-
# the version name ended like ".123" instead of "-123".
276-
local alternate_predicted_version;
277-
alternate_predicted_version="${predicted_version%-*}.${predicted_version##*-}"
278-
if [ "${flutter_version}" != "${alternate_predicted_version}" ]; then
279-
cat >&2 <<EOF
280-
error: Flutter commit in pubspec.yaml seems to differ from version bound
281-
Commit ${flutter_commit} was described as: ${commit_described}
282-
We therefore expect the Flutter version name to be: ${predicted_version}
283-
But the Flutter version bound in pubspec.yaml is: ${flutter_version}
284-
EOF
285-
return 1
286-
fi
287-
fi
252+
# TODO(#1851) Add the updated Flutter version name check
288253

289254
# Check the commit is an acceptable commit.
290255
local commit_count

0 commit comments

Comments
 (0)